3 Replies Latest reply on Jan 23, 2008 3:59 AM by Daniel Kane

    Ajax form in each table row - only the one in last row works

    Daniel Kane Novice

      I have the following construction :

      - rich:tabpanel , where tabs are being generated with c:forEach
      - on each tab, rich:panelBar where bars are being generated with c:forEach
      - on each bar, rich:dataTable
      - in each dataTable row I have a:form :

       <h:panelGrid columns="2">
       <h:inputText value="#{termprop.stringValue}"/>
       <a:commandButton value="Set" action="#{terminalAdm.updateProperty(subgroupitem.subgroup.key, termprop.code)}"/>

      termprop.setStringValue :

      public void setStringValue(String stringValue)
       this.stringValue = stringValue;
       System.out.println("value was set to "+stringValue);

      terminalAdm.updateProperty :

      public void updateProperty(String subgroupKey, String propKey)
       System.out.println("Updating property name="+propKey);

      The problem :
      When I click "Set" in the last table row, I get both logging messages as expected :

      19:19:41,671 INFO [STDOUT] Updating property name=C450
      19:19:48,140 INFO [STDOUT] value was set to 44444444

      When I click "Set" in any row that is not last, I get only
      19:19:48,140 INFO [STDOUT] Updating property name=C470

      but not message from setter.

      I.e. form is being submitted but value from h:inputText does not come.

      Any ideas ?

      Thank you