Is the documentation at
http://struts.apache.org/2.0.9/docs/tree.html out of
date? I haven't looked at it in quite awhile now.

d.

--- Cosmin Stanciu <[EMAIL PROTECTED]> wrote:

> Hi! 
> I have been trying for a week now to populate one
> <s:tree> with the data from a database table but
> with no luck . I would really apreciate some
> guidance in how to write the ShowDynamicTreeAction
> class that sends the date to the tree.
> 
> I'm using Hibernate DAO to receive the data from my
> database table and it looks like this.
> Category: id, name, parent_category_id (from a a
> recursive 1:n relation to the same table using the
> id).
> The Hibernate generated object (Category.java) has
> the fallowing fields: 
> private Integer id;
> private Category category;
> private String name;
> private Set categories = new HashSet(0);
> 
> In the CategoryDAO class I have all the methods
> needed to retreive data from the table:
> - Category findById(int Id), List findById(int Id),
> List findParents() and I can add any needed
> method...
> 
> My struts.xml has a reference to the class
> showDynamicTreeAction:
>         <action name="showDynamicTreeAction"
> class="struts2.ShowDynamicTreeAction">
>             <result>/jsp/CategoryList.jsp</result>
>         </action>
> 
> I'm sure that helping solving this issue would be of
> much interest for all those that intend to use
> s:tree in their application, as there no example or
> help regarding this matter on the internet.
> 
> Thanks a lot!
> Cosmin
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to