0 Replies Latest reply on Sep 9, 2009 8:56 PM by Jean Baldessar

    Dynamic include problem

    Jean Baldessar Newbie

      Hi! I want to do something like that:


      <a4j:outputPanel id="componentToReRender" >
         <ui:repeat value="#{backingBean.myIncludes}" var="includePath" >
            <ui:include src="#{includePath}" />
         </ui:repeat>
      </a4j:outputPanel>
      <a4j:commandButton value="add some include"
                         action="#{backingBean.addSomeInclude" // add some value in backingBean.myIncludes list
                         reRender="componentToReRender"/>
      <a4j:commandButton value="remove some include"
                         action="#{backingBean.removeSomeInclude" // remove some value in backingBean.myIncludes list
                         reRender="componentToReRender"/>reRender="componentToReRender"/>
      



      But I cant because the include tag dont work with the var value of a ui:repeat. You can say use c:forEach, but according with some articles I read (like this), I cant do that to, because I want do remove and add values in my backingBean list.


      What can I do?