How to get value of h:inputText when binded in JSF

Posted by Tr?n Minh Phuong on Stack Overflow See other posts from Stack Overflow or by Tr?n Minh Phuong
Published on 2014-08-24T10:16:49Z Indexed on 2014/08/24 10:20 UTC
Read the original article Hit count: 228

Filed under:
|

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>

© Stack Overflow or respective owner

Related posts about java

Related posts about jsf