I've the below data table:
<h:dataTable var="row" value="#{myBean.listOfStrings}">
<h:column>
<h:inputText value="#{row}" />
</h:column>
</h:dataTable>
Which is tied to a List<String>
:
private List<String> listOfStrings = new ArrayList<String>();
public List<String> getListOfStrings() {
return listOfStrings;
}
public void setListOfStrings(List<String> listOfStrings) {
this.listOfStrings = listOfStrings;
}
When I enter a value in the field and save the form it is not passing the value to the field in the list, it is setting null
, what am I doing wrong here?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…