Hello! Thanks for the supper fast answer!
No it's not! But "This section of the documentation is a work-in-progress; more 
to follow." and on the Action tab the funtionality is not shown. :(
I know how to set the getters and setters but don't know how to match the data 
from hibernate with the one needed by the <s:tree> :

public class ShowTreeAction {
    private Category _rootNode;      // Top-level tree node.
    // what's next?

}

Thank you!
Cosmin



----- Original Message ----
From: Dave Newton <[EMAIL PROTECTED]>
To: Struts Users Mailing List <user@struts.apache.org>
Sent: Thursday, October 18, 2007 6:22:39 PM
Subject: Re: <s:tree> and Hibernate


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]






__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to