Hello All, I am new in rich faces, I have one problem.
I must add new row in the page, fill and save,
it can be datatable.
<h:dataTable value="#{taxsystemCountry.taxsystemCountryItems}" var="item">
<h:column>
<f:facet name="header">
<h:outputText value="Uid"/>
</f:facet>
<h:outputText value=" #{item.uid}"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Code"/>
</f:facet>
<h:outputText value=" #{item.code}"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Name"/>
</f:facet>
<h:outputText value=" #{item.name}"/>
</h:column>
....................
</h:dataTable>
<h:commandButton id="add" action="#{bean.addNewDataItem}" value="ADD ROW" />
<h:commandButton id="save" action="#{bean.save}" value="Save" />.......
Hello,
Rows are rendered by traversing items collection. You have to add item to collection (in bean) and re-render the whole data table.