0 Replies Latest reply on Mar 29, 2012 7:54 PM by Anton Kuranov

    TabPanel pass parameters problem

    Anton Kuranov Newbie

      Hello,

       

      We are migrating from 3.3 to 4.2 and have the following question about TabPanel:

       

      <h:form>

      <rich:tabPanel activeItem="#{myBean.selectedTab}" switchType="ajax" >

              <rich:tab id="tab1" header="Tab1">

              <f:param name="tab" value="tab1"/>

                  ...

              </rich:tab>

              <rich:tab id="tab2" header="Tab2">

              <f:param name="tab" value="tab2"/>

                  ...

              </rich:tab>

              </rich:tab>  

      ...

       

      We would like to pass parameter "tab" and parse it in MyBean constructor, something like that

       

      public MyBean() {

       

              FacesContext fc = FacesContext.getCurrentInstance();

              Map params = fc.getExternalContext().getRequestParameterMap();

       

              String param = (String) params.get("tab");

      ...

       

      It worked in 3.3 and not in 4.2, how can we pass parameters in TabPanel when switching the tabs? only using ItemChangeListener or exists any similar way to f:param option?

       

      Thanks in advance!