I'm just looking for a clarification of how digester.addSetTop works in the
example.

>From DatabaseServlet.load() 
...................................................
        digester.addObjectCreate("database/user",
                                 "org.apache.struts.example.User");
        digester.addSetProperties("database/user");
        digester.addSetNext("database/user", "addUser");
        digester.addObjectCreate("database/user/subscription",
                                 "org.apache.struts.example.Subscription");
        digester.addSetProperties("database/user/subscription");
        digester.addSetTop("database/user/subscription", "setUser");
....................................................

>From what I can gather, the addSetTop method adds a SetTopRule which
specifies that the Subscription object will be added to the parent object,
User, via the setUser method.  Am I understanding this correctly?  If I am,
then where is the setUser method?  Shouldn't "setUser" be "addSubscription"?

Thanks :)

Scott

Reply via email to