How to get value of h:inputText when binded in JSF
- by Tr?n Minh Phuong
How can i get 2 h:inputTextValue from this?
<h:dataTable cellspacing="0" value="#{managerManagedBean.lstMatch}" var="m" binding="#{managerManagedBean.datatableMatch}"> <!-- cellspacing='0' is important, must stay -->
<h:column>
<f:facet name="header">Team One</f:facet>
<h:outputText value="#{m.teamOneName}"></h:outputText>
</h:column>
<h:column>
<f:facet name="header">Match Score</f:facet>
<h:inputText value="#{m.teamOneResult}" style="width: 20px; text-align: center" binding="#{input}"></h:inputText> -
<h:inputText value="#{m.teamTwoResult}" style="width: 20px; text-align: center"></h:inputText>
</h:column>
<h:column>
<f:facet name="header">Half Time</f:facet>
<h:outputText value="#{m.haveHalfTime}"></h:outputText>
</h:column>
<h:column>
<f:facet name="header">Team Two</f:facet>
<h:outputText value="#{m.teamTwoName}"></h:outputText>
</h:column>
<h:column>
<f:facet name="header">Match Date</f:facet>
<h:outputText value="#{m.matchDate}"></h:outputText>
</h:column>
<h:column>
<f:facet name="header">Control</f:facet>
<h:commandButton action="#{managerManagedBean.update(m, input.value)}" value="Update Match">
</h:commandButton>
</h:column>
</h:dataTable>