Hi,
Is is able to use a jsf-side with <x:tree> and <x:updateActionListener>
like:

<x:tree id="tree" value="#{deviceCapForm.treeModel}"
        var="treeItem"
        styleClass="tree"
        nodeClass="treenode"
        headerClass="treeHeader"
        footerClass="treeFooter"
        rowClasses="standardTable_Row1,standardTable_Row2"
        columnClasses="standardTable_Column"
        selectedNodeClass="treenodeSelected"
        expandRoot="true">
        
        <x:treeColumn>
          <f:facet name="header">
            <h:outputText value="Tree" />
          </f:facet>
          <x:commandLink action="go_detail" immediate="true" >
            <h:outputText value="#{treeItem.nodeName}" />
            <x:updateActionListener property="#{treeItemDetailForm.id}"
value="#{treeItem.ID}" />
          </x:commandLink>
        </x:treeColumn>
        <h:column>
          <h:outputText value="#{treeItem.ID}" />
          <h:commandButton value="saveID" action="#{treeItem.printID}"/>
        </h:column>
        <h:column>
          <f:facet name="header">
                        <h:outputText value="Details" />
                </f:facet>
          <h:outputText value="#{treeItem.attributesAsString}" />
        </h:column>
</x:tree>

I use myfaces in version 1.0.8
My problem:
 - In my bean treeItemDetailForm I got not the actual ID
   (<x:updateActionListener property="#{treeItemDetailForm.id}"
value="#{treeItem.ID}" />)

 - And there is the same problem with the action treeItem.printID
public String printID()
{
    System.out.println("XXXID: "+m_ID);
    return "ok";
}
The printed ID is not equal the displayed ID in the tree
 (<h:outputText value="#{treeItem.ID}" />)

In both cases myfaces give the beans the ID of the lasted node.

Thanks
Michael Flesch


Reply via email to