You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Darren McGuinness <Da...@morganstanley.com> on 2002/08/21 15:50:34 UTC

Nesting beans

I  have seen in documentation that Struts 1.1 supports nesting tags.
However, I'm using struts 1.0(unavoidable), and  I'm looking to
implement nesting in the beans, and can't find any concrete examples.

I have a LoginForm  bean, and within this bean have an attribute
"session" of type SessionBean (another bean i've made). I've seen an
example(http://www.keyboardmonkey.com/next/Primer_partTwo.jsp?content=yesplease)

showing the way you access in a JSP is:

   <html:text name="logonBean" property="session.requestId"/>
to access the 'requestId' attribute in the SessionBean.

my question now is, if this actually works, how can you have an
attribute which is a vector/list of SessionBeans;
do I just declare an attribute like so:
    vector session;
and have add/remove/get/set methods for it?

then do i access each SessionBean like so:
   <html:text name="logonBean" property="session[0].requestId"/>
?

cheers




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>