Use h:dataTable and DTO's.
JSF<h:dataTable value="#{myBean.list}" var="item">
<h:column><h:inputText value="#{item.value1}" /></h:column>
<h:column><h:inputText value="#{item.value2}" /></h:column>
<h:column><h:inputText value="#{item.value3}" /></h:column>
</h:dataTable>
<h:commandButton value="add" action="#{myBean.add}" />
MyBeanprivate List<Dto> list; // + getter + setter
public void add() {
list.add(new Dto());
}
DTOpublic class Dto() {
private String value1;
private String value2;
private String value3;
// + getters + setters
}
This article might give you some new insights about using datatables, also note the CRUD example in the downloadable EAR there: http://balusc.xs4all.nl/srv/dev-jep-dat.html