myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Svilen Ivanov" <>
Subject Nesting t:tree2; problem with binding
Date Mon, 29 Jan 2007 16:23:57 GMT

I need to create a tree which nodes contain another tree as well.
Something like the following (simplified) JSF snippet.

<t:tree2 id="outerTree" value="#{myBean.treeModel}"
    binding="#{myBean.treeData}" var="node">
    <f:facet name="team">
        <t:tree2 id="innerTree" value="#{node.treeModel}">
            <f:facet name="task">
                <h:outputText value="#{}"/>

The problem is that the "innerTree" expand/collpase state is one and
same for each node of "outerTree". For example if first rendered
"team" facet has only 2 levels, the rest of the "innerTree"s for the
rest of the nodes would be expanded to the 2nd level only.

I assume that the problem is that innerTree don't have binding
associated. When I tried to associate binding where "node" is the key
to the binding - I receive exception that "node" is null. I assume
that the problem is due to creating binding in earlier JSF phase that
evaluating the tree.

Does anyone has an idea how to make the state of outerTree unque for
each innerTree node? I would prefer a solution other than "making a
one big tree" opposed to composition of trees.

Thank you in advance,
-- Svi

View raw message