| Author |
trying to get another aspect of the rich tree working
|
Matt Kohanek
Village Idiot
Ranch Hand
Joined: Apr 04, 2009
Posts: 483
|
|
I think I am just mis-using some of the elements or attributes. I have looked at tutorials and such but cant seem to figure this one out.
If I understand correctly what I have read, I can first load a list with some xml. I have gotten to this point. I have a list I call ids. When I do this line:
System.out.println("Printing out ids list: "+ids.toString());
it prints out:
I cut out some of the values but as you can see, my list "ids" now holds this xml.
So lets say I want to use deviceId as the roots, and name for the child under each root.
So using the value of ids I have there, it should come out like this:
|-spaces2
|---spaces2
|
|-exampleDevice1
|---Example Device 1
|
|-JSFTEST02
|---JSFTEST02
Just a simple tree right? So how can I do this?
Right now I am doing something else. Right now I am loading my ids list with just the deviceId values, so my list when printed as a string looks like:
printing: [spaces2, exampleDevice1, JSFTEST02]
Now this is very simple to bind to a tree, but I end up with a tree that has three branches and no child nodes.
Playing around with that I get various results, but nothing I am looking for.
So basically, I have a list that is loaded with xml data, and I need to use the deviceId element as the root and the name element as the nodes under the roots.
I know I have read that this is possible, but I cant figure out how to do this.
I have seen an example that used var="items" nodes="#{items.nodes}"
but I cant make any sense of this. I have looked through many tutorials and such and cant seem to get this.
Please help?>
|
True wisdom is in knowing you know nothing - Socrates
|
 |
 |
|
|
subject: trying to get another aspect of the rich tree working
|
|
|