0 Replies Latest reply on Mar 10, 2008 1:22 PM by Randy Saborio

    PanelBar with dynamically rendered PanelBarItems is not work

    Randy Saborio Newbie

      PanelBar doesn't consider PanelBarItems rendered dynamically, if you have:

      <rich:panelBar id="pb">
       <rich:panelBarItem id="pbi1" rendered="#{isPb1Rendered}">
       <rich:panelBarItem id="pbi2" rendered="#{isPb2Rendered}">
       <rich:panelBarItem id="pbi3" rendered="#{isPb3Rendered}">
       <rich:panelBarItem id="pbi4" rendered="#{isPb4Rendered}">

      RichFaces always generate javascript code for the four of them even when some of the panel bar items are not rendered, this causes PanelBar to fails. The generated javascript code looks like:

      new Richfaces.PanelBar('pb',{'items':[{'onleave':'','onenter':'','id':'pbi1'} ,{'onleave':'','onenter':'','id':'pbi2'} ,{'onleave':'','onenter':'','id':'pbi3'} ,{'onleave':'','onenter':'','id':'pbi4'} ] ,'onitemchange':''} );

      I've tested with the following versions:

      RichFaces 3.1.3 GA: Working!
      RichFaces 3.1.4 GA: Not working!
      RichFaces 3.1.5 SNAPSHOT: Not working!
      RichFaces 3.2.0 SNAPSHOT: Not working!