10 Replies Latest reply on Sep 9, 2011 11:57 AM by Benniu Ji

    4.1.0 M1 rich:orderingList Validation error

    Benniu Ji Newbie

      In the test.xhml:

       

      <rich:messages />

                  <rich:orderingList id="list" value="#{planManager.values}" columnVar="item">

                  <rich:column>

                                            <f:facet name="header">Id</f:facet>

              <h:outputText value="#{item.title}" />

              </rich:column>

         <rich:column>

                                                     <f:facet name="header">title</f:facet>

             <h:outputText value="#{item.value}" />

         </rich:column>

                  </rich:orderingList>

                  <br/>

      <a4j:commandButton value="submit" action="#{planManager.submit()}" />

       

      PlanManager:

          public PlanManager(){

                          values.add(new EntityBean("Option 1", "1"));

                          values.add(new EntityBean("Option 2", "2"));

                          values.add(new EntityBean("Option 3", "3"));

                          values.add(new EntityBean("Option 4", "4"));

                          values.add(new EntityBean("Option 5", "5"));

       

                }

       

                public List<EntityBean> getValues(){return values;}

       

                public void setValues(List<EntityBean> values){this.values=values;}

       

                public String submit(){

                          System.out.println("call submit");

                          for (int i=0; i<values.size(); i++){

                                    System.out.println(values.get(i).getTitle());

                          }

       

        return "failure";

                }

       

      When I click submit button on the page, it alaways show up a error msg:  "j_idt30:list: Validation Error: Value is not valid"

       

      What's wrong?