9 Replies Latest reply on Sep 11, 2009 7:13 AM by Jean Baldessar

    Dynamic include problem

    Jean Baldessar Newbie

      Hi! I posted this in the seam forum too...
      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"/>


      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.

      the same happens if I use a4j:repeat and a4j:include...

      What can I do?