J
joneepenk
i put inputText in a dataTable, it works normal for display bean
property.
but i cannot get the modified value of inputText,that is,the change of
inputText was disappeared after submit.
i want know why this happend. any help will be appreciated.
ps: jsf is so wierd in my use of it, i am considering substitute jsf
with struts2.
jsf code as follow, in whitch "name" is a simple pojo, and
"tableData.names" simple return the array of "name" pojos:
<h:form>
<h:dataTable value="#{tableData.names}" var="name">
<h:column>
<f:facet name="header">
<hutputText value="edit"/>
</h:column>
<h:column>
<f:facet name="header">
<hutputText value="last"/>
</f:facet>
<h:inputText value="#{name.last}" rendered="#{name.editable}"/>
<hutputText value="#{name.last}" rendered="#{not name.editable}"/>
</h:column>
<h:column>
<f:facet name="header">
<hutputText value="first"/>
</f:facet>
</h:column>
</h:dataTable>
</h:form>
property.
but i cannot get the modified value of inputText,that is,the change of
inputText was disappeared after submit.
i want know why this happend. any help will be appreciated.
ps: jsf is so wierd in my use of it, i am considering substitute jsf
with struts2.
jsf code as follow, in whitch "name" is a simple pojo, and
"tableData.names" simple return the array of "name" pojos:
<h:form>
<h:dataTable value="#{tableData.names}" var="name">
<h:column>
<f:facet name="header">
<hutputText value="edit"/>
</h:column>
<h:column>
<f:facet name="header">
<hutputText value="last"/>
</f:facet>
<h:inputText value="#{name.last}" rendered="#{name.editable}"/>
<hutputText value="#{name.last}" rendered="#{not name.editable}"/>
</h:column>
<h:column>
<f:facet name="header">
<hutputText value="first"/>
</f:facet>
</h:column>
</h:dataTable>
</h:form>