1 Reply Latest reply on Jun 26, 2012 7:05 AM by healeyb

    Render TAB contents only if confirmed by user on TAB change.

    cooldownthethroat

      I am using RF3.3 and JSF(2.0) wiht JSPs in the project.

       

      My page contains 4 tabs inside a tab panel. When page is first loaded, the TAB1 is automatically selected which is ok. Now before user navigate from one tab to another tab I need to show him a pop up panel asking his confirmation to move from one tab to another. So when User present on TAB 1 clicks on TAB2 I want a pop up panel asking user whether he is sure to navigate to TAB2.

      The problem is Once i CLICK tab 2 the action listener present with is fired and tab2  is rendered and only then pop up panel comes.

       

      IS THERE ANY WAY TO open pop up panel once user click on TAB 2 and only if he clicks YES in pop up panel the contents of TAB 2 is shown.

       

      I cannot use disabled attribute since using that I won't be able to click on TAB 2 and my pop up panel won't open.

      <rich:tabPanel id="tab" switchType="ajax" headerSpacing="10px"style="overflow:auto"> 

      <rich:tab binding="#{Bean.firsttab}" id="tabOne" style="overflow:auto" styleClass="richTab" label="TAB ONE" actionListener="#{Bean.refresh}" switchType="ajax">

      <rich:tab binding="#{Bean.secondtab}" id="tabTwo" style="overflow:auto" styleClass="richTab" label="TABTWO" actionListener="#{Bean.refresh}" switchType="ajax">

      </rich:tabPanel>

       

      I preferably don't want to use Javascript to achieve the same...Can anyone please suggest...