3 Replies Latest reply on Feb 13, 2007 7:12 AM by Fredric

    How do I edit the contents of a datatable row?

    Fredric Newbie

      My problem is, when I try to inject the object from the row I try to edit, I get the object in its unchaged mode, and I can't find the changes.

      Do you have ideas how to get the changes?

      In my stateful sessionbean @Name("aclList")

       private List<ACL> acls;
       private ACL selAcl;
       private List<ARO> rights;
       private ARO selAro;
      + the metods to fill the Lists...

      In the stateless action bean @Name("aclAction")

       private ACL selAcl;
       public void edit(){
       System.out.println("ACLAction:edit() :: " + selAcl);

      This is my form in the XHTML page

       <h:dataTable value="#{acls}" var="selAcl" rendered="#{acls.rowCount>0}">
       <f:facet name="header">Resource</f:facet>
       <f:facet name="header">Right</f:facet>
       <h:selectOneMenu id="selAro" value="#{selAcl.aro.ID}">
       <si:selectItems value="#{rights}" var="aro" label="#{aro.name}" key="#{aro.ID}"/>
       <f:facet name="header">Valid</f:facet>
       <h:selectBooleanCheckbox value="#{selAcl.valid}"/>
       <s:link action="#{aclAction.delete}">Delete</s:link><br/>
       <s:link action="#{aclAction.edit}">Change</s:link>