I want to build a checkbox tree with richfaces.
I saw here a sample with another jsf implemetation.
I want to have a similar functionality.
is it possible? How?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’m not sure RichFaces will be able to help you with that, but OmniFaces surely will.
Add the JAR to your project as instructed on the project page, then create in your bean an implementation of TreeModel.
Here is the example from the showcase, using the provided
ListTreeModel:Then, on your XHTML page, you can create your custom markup for the tree, here is an example using an HTML list with checkboxes:
Then, for the collapsible effect you’ll have to do some JavaScript, or reuse some of those that already exists.