2 Replies Latest reply on Oct 16, 2007 9:56 AM by Ilya Shaikovsky

    rich:datatable problem

    inv3r53 d Novice

      HI

      I have two input components and a add button.i fill inputs and press add button.the row gets added to the rich :datatable.
      i am using a4j button.
      when i adda row the header of table disappears.

      w.r.t code below

      <a4j:region>
      <h:selectOneMenu id="id_select"
       value="#{myBean.selectedItem}">
       <f:selectItems
       value="#{myBean.selectItems}" />
       <a4j:support event="onchange"
       action="#{myBean.action}"
       reRender="id_u" />
       </h:selectOneMenu></td>
      
       <td><h:outputText id="id_u"
       value="#{myBean.u}" /></td>
       </tr>
       <tr>
       <td><a4j:commandButton
       value="#{resource.add}"
       action="#{myBean.addObject}" reRender="id_table"/></td>
       </tr>
       </table>
      
       <br /><a4j:outputPanel id="id_table">
       <table width="100%" border="0">
       <tr>
       <td valign="top"><rich:datascroller for="tp"
       maxPages="10" width="100%" /> <rich:dataTable
       id="tp" rows="4"
       value="#{myBean.list}"
       var="tr">
       <f:facet name="header">
       <rich:columnGroup>
       <rich:column>
       <h:outputText value="item" />
       </rich:column>
       <rich:column>
       <h:outputText value="U" />
       </rich:column>
      
       </rich:columnGroup>
       </f:facet>
       <rich:columnGroup>
       <rich:column>
       <h:outputText value="#{tr.itemName}" />
       </rich:column>
       <rich:column>
       <h:outputText value="#{tr.u}">
       </h:outputText>
       </rich:column>
      
       </rich:columnGroup>
       </rich:dataTable></td>
       </tr>
       </table></a4j:outputPanel></a4j:region>