-
1. TagException with recursiveTreeNodesAdaptor/treeNodesAdaptor tags
nbelaevski Apr 29, 2011 9:02 AM (in response to david03)Hi David,
Some tags were renamed in 4.x, this one is now called treeModelRecursiveAdaptor. Please take a look: docs.jboss.org/richfaces/latest_4_0_X/vdldoc/overview-summary.html
-
2. TagException with recursiveTreeNodesAdaptor/treeNodesAdaptor tags
david03 May 2, 2011 3:21 AM (in response to nbelaevski)Thanks Nick. I supposed it had something to do with tag renaming, but I didn't manage to find a solution.
Regarding this tag, I have had look to several examples, such the official example for the tag, and examples for recursive tree nodes, among other examples found in blogs.
The point is that I haven't succeeded to see how to manage nodes which their parent can be of one type or another one. This case can't be tackled with the bean structure provided for simple tree example, as one node can't have parents of different types.
For example, taking into account the folder/files examples. I should have a list of nodes for the root folders. Then, a list of nodes for the rest of nodes.
A folder can have two kind of children, folder(s) and file(s). How should I manage this case?
On the other hand, which interface should the nodes implement so that tree component can retrieve the nodes? getChildren() getParent() methods?
These methods should return a List structure of nodes?
-
3. TagException with recursiveTreeNodesAdaptor/treeNodesAdaptor tags
nbelaevski May 2, 2011 4:14 PM (in response to david03)>> A folder can have two kind of children, folder(s) and file(s). How should I manage this case?
The easiest is to create two separate attributes for files and folders and set two different adaptors to be used.
>> On the other hand, which interface should the nodes implement so that tree component can retrieve the nodes?
>> getChildren() getParent() methods?
Adaptor tags do not require any particular interface. They are working by evaluating EL-expression that you define via tag attributes.