See this wiki entry

http://wiki.apache.org/myfaces/Tree2

You'll find two different methods to load tree content while opening
its nodes, with examples. I personally suggest you the second one
(Alternative Tree2 Lazy Loading Method...by jtmille3).

Cosma


2006/6/5, Todd Patrick <[EMAIL PROTECTED]>:
I looked in the mailing list archive, there are a lot of discussions,
but there are no examples.

The closest discussion is listed below between Sean and Stefan back on
Nov 22, 2005.

Honestly, I haven't found one example.

I'd appreciate any thoughts or pointers, whatever at this point.

Thanks,

--Todd



"Please post your MyFaces questions to the user list.  There are lots
of people who can help you with this issue there.

sean

---------- Forwarded message ----------
From: Stefan Vargocko <[EMAIL PROTECTED]>
Date: Nov 22, 2005 3:28 AM
Subject: Changing content of the tree2
To: [EMAIL PROTECTED]



Hi Sean,
I am using tree2. I am very satisfied with it, it's very nice and
allows a lot of control. But I have one problem. I want to change
content of the tree when some node is expanded. In general, I want to
load children for node which should be expanded (so there is a click
on a "+"). Is there any possibility to do this?
Thank You for help.
Stefan"




-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Matthias Wessendorf
Sent: Monday, June 05, 2006 10:09 AM
To: MyFaces Discussion
Subject: Re: Is there an example of using tree2 with data from a
database?

can you search the archive?
Tree2 is very popular and question regarding loading data have already
been asked.

Thx,
-Matthias

On 6/5/06, Todd Patrick <[EMAIL PROTECTED]> wrote:
>
>
> Is there an example of using tree2 with data from a database?
>
> Example, I have the following tree:
>
> + A
> + B
> + C
>
> When I expand "A", I need to send "A" as a parameter to a public
> method in my backing bean, which calls a method in a POJO that returns

> the record set "1, 2, 3".
>
>
> - A
>   - 1
>   - 2
>   - 3
> +B
> +C
>
> The SQL in the POJO looks similar to:
>
> SELECT child_value, child_label
> FROM child_table
> WHERE parent = "A"
>
>
> Thoughts, suggestions or examples are greatly appreciated.
>
> Thanks,
>
> --Todd
>
>


--
Matthias Wessendorf
Aechterhoek 18
48282 Emsdetten
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com

Reply via email to