can't edit my h:datatable

Posted by Mike on Stack Overflow See other posts from Stack Overflow or by Mike
Published on 2010-04-07T09:30:28Z Indexed on 2010/04/08 12:23 UTC
Read the original article Hit count: 154

Filed under:
|

hi! i have this code:

<h:form>
        <rich:dataTable  value="#{my.lreqs}"  var="req"
            id="reqs" width="630px"  >
                <rich:column label="Value" styleClass="schColL" width="90px"
                style="text-align:center">
                <f:facet name="header">
                    <h:outputText value="#{my.colValue}" />
                </f:facet>
                <h:inputText value="#{req.value}" >
                </h:inputText>
            </rich:column>
        </rich:dataTable>
        <h:commandButton value="Save"
            action="#{my.saveChanges}" ></h:commandButton>
    </h:form>

and this is my bean:

private List<Detail> lreqs;

public List<Detail> getLreqs() {
        return lreqs;
}
public void setLreqs(List<Detail> lreqs) {
        this.lreqs = lreqs;
}

public void saveChanges() {

        firstNewValue = lreqs.get(0).getValue();
        }

but when i click save - a new value in req.value field is not being saved! why is it?

© Stack Overflow or respective owner

Related posts about jsf

Related posts about richfaces