0 Replies Latest reply on May 18, 2008 11:36 PM by jackyeh

    How to do value binding inside of ui:repeat

    jackyeh

      I'm trying to bind panels that generated from a xhtml file to a backing bean within an ui:repeat tag as following :

      <ui:repeat value="#{home.wins}" var="pan">
       <rich:panel binding="#{pan}">
       <h:outputText value="1. #{pan} " />
       </rich:panel>
      </ui:repeat>


      public class Home {
       private UIComponent[] wins;
      
       public HomeLayout() {
       wins = new HtmlPanel[6];
       }
       public UIComponent[] getWins() {
       return wins;
       }
       public void setWins(UIComponent[] wins) {
       this.wins = wins;
       }
      }


      The result appears that 6 rich:panel are generated from the xhtml file (with the <h:outputText value="1. #{pan} " /> tag rendered in the panels), but does not bind to the backing bean, say the #{home.wins}, as expected.

      Do I make any mistake ?

      Environment :
      JDK : java-1.5.0-sun-1.5.0_update15
      AS : jboss-4.2.2.GA
      jboss-seam-2.0.1.GA
      richfaces-ui-3.2.0.SR1