Preview: CheckBox in tree component (2.0)
I'm using primefaces 2.0 with JSF 2.0. In primefaces 1.0 the tree component can have checkbox capabilities.
How can I have the same behavior with primefaces 2.0?
I read that I could define a component as a tree node. How can I do that?
Basically what I want is to asociate a ACL tree with each Role in my system.
Thanks a lot,
Javier
[SOLVED] CheckBox in tree component (2.0)
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
PrimeFaces 1.x and 2.x is no different in terms of featureset. Checkbox based selection applies to 2.x as well.
-
- Posts: 17
- Joined: 01 Feb 2010, 17:17
I dont get it. In component showcase (which I think is based on primefaces 1.0). The description of the Tree component says "Tree has built-in support for checkbox based node selection, just define a TreeNode array that will be used to populate the selected nodes."
Wich is true because if you define a tree al the nodes are check selection.
But in primefaces 2.0, I defined a tree
<p:tree value="#{rolController.raiz}"
toggleMode="async"
nodeSelectListener="#{rolController.nodoSeleccionado}"
nodeExpandListener="#{rolController.nodoExpandido}"
nodeCollapseListener="#{rolController.nodoContraido}">
</p:tree>
The nodes are being populated but they are only text labels. They dont have a selection check component. Also "selection" (for selected nodes) is not a valid attribute of the tree component in primefaces 2.0.
Thanks
Wich is true because if you define a tree al the nodes are check selection.
But in primefaces 2.0, I defined a tree
<p:tree value="#{rolController.raiz}"
toggleMode="async"
nodeSelectListener="#{rolController.nodoSeleccionado}"
nodeExpandListener="#{rolController.nodoExpandido}"
nodeCollapseListener="#{rolController.nodoContraido}">
</p:tree>
The nodes are being populated but they are only text labels. They dont have a selection check component. Also "selection" (for selected nodes) is not a valid attribute of the tree component in primefaces 2.0.
Thanks
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
I see, that feature is added after 2.0.0.RC so you need a nightly build of 2.0.0-SNAPSHOT or wait a little until the release.
Nightly builds are at;
http://repository.prime.com.tr/org/prim ... -SNAPSHOT/
Nightly builds are at;
http://repository.prime.com.tr/org/prim ... -SNAPSHOT/
-
- Posts: 17
- Joined: 01 Feb 2010, 17:17
Thank you very much! Now with the snapshot is working like a charm...
If I had read the forum carefully, I would noticed about it. Because I saw that you answered that question in a previous post. Sorry for that
If I had read the forum carefully, I would noticed about it. Because I saw that you answered that question in a previous post. Sorry for that
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
No problem.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 17 guests