1 Reply Latest reply on Sep 14, 2011 3:40 AM by Sudharma Puranik

    Dynamic incude page in xhtml page using facelets

    Sudharma Puranik Newbie

      I have a favourites chart, on click on an item in the chart, I have to inlcude a page in rich:tab. The favourites chart is built using jQuery and on each leaf click event I do a ui:include with jstl check. Please find the below code.


      <rich:tab label="#{mnOrdrMsgs.mainordr}" immediate="true"
      id="mainorderTab" styleClass="tabPanel">

      <c:if test="${favouritesBean.selectedNaviItem != null}">
      <ui:include src="#{favouritesBean.selectedPage}" />

      <rich:tab label="#{mnOrdrMsgs.archiv}" immediate="true"
      id="archivTab" styleClass="tabPanel">



      The problem is the value of favouritesBean.selectedPage is always null. Can anyone please help in this case. I am really stuck since 2 days.


      first I set the value in the backing bean from javascript(code below).


      <a4j:jsFunction name="updateTab" reRender="mainorderTab">

      <a4j:actionparam name="naviItemSelected" assignTo="# {favouritesBean.selectedNaviItem}" />




      later in the bean the value is checked(code below)


      public String getSelectedPage(){


      selectedPage="/protected/mainorder/auftragtemplate.xhtml"; }

      return this.selectedPage; }


      Is this the right way?