>
>
>I know JSP will automatically save parameters to a javabean with the
>correctly named getters and setters, but there's obviously a gap in my
>knowledge because all my attempts to recreate the situation above have
>failed. 
>

Setting form properties against beans is a Struts thing, not a JSP 
thing. The property thing is a Bean thin and can be looked up in the 
JavaBean spec.

The example you quote...

    "monkeyTeamAlpha.monkeyWorkers[0].salary"

        ...is a nested property. An invention implemented within Struts 
(Craig?). What it basically is, is a string of calls rather than the 
single property method. Here, it will get a hold of the form bean, get a 
hold of the bean returned from the "monkeyTeamAlpha"property. On this 
bean, it will invoke the indexed property "monkeyWorkers[0]" which will 
pluck a bean from a collection or index provided, from this last bean it 
will will get a hold of its "salary" property, and set the value.

All this boils down to, is that you can compose objects a little 
cleaner, rather than have truly enormous beans for everything. Having 
the indexed properties allows for lists and whatever else.

The ability for nesting beans has been in Struts for a long time. The 
nested tags just make it much easier.

There's a primer and tutorial for nested beans here...

    http://www.keyboardmonkey.com/next

        ...it should take you over creating and using such a construct.

Hope this gets you on th path you're after.


Arron.


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

Reply via email to