Page 1 of 1

Applying styles to dynamic tree is not working

Posted: 02 Nov 2010, 10:50
by codo
Hello guys,

I want to apply some css styles to the dynamic tree. Here is short example of what I'm trying to do:

Code: Select all

            <p:tree value="#{treeBean.root}" var="node" dynamic="true">
                <p:treeNode>
                    <h:outputText value="#{node}" style="padding-left: 20px;"/>
                </p:treeNode>
            </p:tree>
When I load the page, the tree is shown but when I try to expand one of the root nodes it starts loading and nothing happens (just loading...). This also happens when I try to put h:outputLink (or whatever tag, different from h:outputText) in the p:treeNode tag.

Any help will be appreciate!

Thank you!

Re: Applying styles to dynamic tree is not working

Posted: 02 Nov 2010, 22:56
by codo
Hello again,

I rolled back the version of PrimeFaces from 2.2.RC1 to 2.1 and it does work now..

Re: Applying styles to dynamic tree is not working

Posted: 02 Nov 2010, 23:39
by KingdomHeart
does taking out the "style" attribute solve the problem? Show case seems to work fine
http://www.primefaces.org/showcase/ui/treeAjax.jsf

Re: Applying styles to dynamic tree is not working

Posted: 03 Nov 2010, 11:59
by codo
Yes. But When you want to style the h:outputText it doesn't work with version 2.2.RC1. And it also doesn't work when you try to put other tag in the treeNode, for example h:outputLink.

Re: Applying styles to dynamic tree is not working

Posted: 03 Nov 2010, 12:07
by codo
By the way, does anyone experience this problem ? I'm using:
primefaces version 2.2.RC1
GlassFish Server 3
Windows XP Professional x64

Thank you!