You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Todd Patrick <To...@dtn.com> on 2006/06/05 16:12:44 UTC

Is there an example of using tree2 with data from a database?

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
 
 

Re: Is there an example of using tree2 with data from a database?

Posted by Matthias Wessendorf <ma...@apache.org>.
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 <To...@dtn.com> 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