Board index JavaServer Faces General Applying styles to dynamic tree is not working

Applying styles to dynamic tree is not working

Components, Ajax Framework, Utilities and More.


Posts: 5
Hello guys,

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

            <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!


Posts: 5
Hello again,

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


Posts: 280
does taking out the "style" attribute solve the problem? Show case seems to work fine
http://www.primefaces.org/showcase/ui/treeAjax.jsf

Mojarra 2.1.10, Glassfish 3.1, Tomcat 7, Primeface 3.3.1
IE 6-8, FireFox 10-13
MAC OSX Lion, Windows XP, 7


Posts: 5
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.


Posts: 5
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!


Return to General