0 Replies Latest reply on Jun 25, 2008 5:02 PM by Eric Chua

    orderingList - onclick

    Eric Chua Newbie

      I am trying to use orderlist so that when I click on a row the selection list is updated. I can't figure out why it isn't. Is a submit required?

      <a4j:form id="listForm">
      <rich:orderingList id="orderlist" value="#{sysAdmin.stores}" onclick="updateForm();" var="store" listHeight="150" listWidth="350" selection="#{sysAdmin.selection}" controlsType="button" >
      <f:facet name="header">
      <h:outputText value="Store id" />
      <h:outputText value="#{store.storeid}" ></h:outputText>
      <f:facet name="header">
      <h:outputText value="Store Name" />
      <h:outputText value="#{store.name}" ></h:outputText>

      <a4j:commandButton id="rerenderbutton" value="reRender" reRender="storeform" />

      I can tell the selection list is not being updated. I would like the update to occur with the onclick. Any ideas?

      public Collection getSelection() {
      return selection;

      public void setSelection(Collection selection) {
      System.out.println("Made it ");
      Iterator selectedIt= selection.iterator();
      Store oneStore = selectedIt.next();
      System.out.println("Made it 2 "+this.storedesc);
      info.add(oneStore.getName()+" "+oneStore.getStoreid()+" " + oneStore.getDescription());
      this.selection = selection;


      My ultimate goal is to click on a row and fill out another form from the same bean.