I'm using the nightly builds for 2.0 and IE and Firefox 3.5.7.
The elements I'm displaying in the tree all contain backslashes. When I first started, the backslashes caused issues with the tree, so I replaced with the appropriate character codes (\). This made everything work OK.
Then I added styles to my treenodes.
When the tree is first displayed, it does not process the character codes. That is, the labels for the nodes are all:
\foo\bar\
If I select one of the nodes, then when the tree is refreshed (to change the color of the selected node), it displays properly:
\foo\bar\
Here is my tree and treenode.
<p:tree id="mytree314"
value="#{TreeBean.mRoot}"
var="node"
dynamic="true"
cache="false"
nodeSelectListener="#{TreeBean.listenerNodeSelect}"
update="formSelectedNode,formButtons,mytree314"
>
<p:treeNode>
<h:outputText value="#{node.displayName}"
style="color: #{(TreeBean.mConceptKey==node.mConceptKey)?'#FF4444':'#4444FF' };" />
</p:treeNode>
</p:tree>
If I simplify style to a fixed color, the problem still occurs.
Any ideas?
Thanks,
Tod
treenode and styles bug or code issue?
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
Can you try escaping backslashes like;
"#{node.displayName}" should return \\foo\\bar\\
"#{node.displayName}" should return \\foo\\bar\\
Escaping with that method gives the same sort of inconsistent processing.
In this case, the top level elements of the tree came out OK.
\foo\
But the elements below did not. They were "unescaped".
\\foo\\bar\\
Clicking on one of the \\foo\\bar\\ elements causes all "unescaped" elements to redraw properly.
But the elements not shown on the screen until their nodes are opened are still incorrect.
\\foo\\bar\\qwerrty\\
It really looks like the nodes are not processed identically each time the tree is displayed/updated.
-Tod
In this case, the top level elements of the tree came out OK.
\foo\
But the elements below did not. They were "unescaped".
\\foo\\bar\\
Clicking on one of the \\foo\\bar\\ elements causes all "unescaped" elements to redraw properly.
But the elements not shown on the screen until their nodes are opened are still incorrect.
\\foo\\bar\\qwerrty\\
It really looks like the nodes are not processed identically each time the tree is displayed/updated.
-Tod
-
- Information
-
Who is online
Users browsing this forum: Google [Bot] and 41 guests