The one thing to watch with nested objects is that they don't expose
anything that should not be exposed. 

One thing we plugged in the imminent 1.01 release candidate is "nesting"
ActionServlet on the ActionForm. This let you do silly things like set
the temporary directory for uploads from a browser. It now uses a
ActionServletWrapper to only expose the non-String properties which are
absolutely needed (a proxy object).

So it's important that any object nested on an ActionForm not make state
changes without validation, at least through String and boolean
properties. 

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/struts/


Arron Bates wrote:
> 
> Just a note on this subject....
> 
> You know that you can get absolutely sweet decoupling from everything
> struts for your data model with the use of nesting objects?... And no
> messy property copying!
> 
> I wanted to get a simple persistence mechanism running for my form
> object, so I placed a little serialization logic into my action (Some
> app servers need their session objects to serialize also, like iPlanet).
> The struts action form wouldn't serialize for me so all I did was add an
> extra nest level and serialized from there down leaving my entire
> structure nothing but the data that I wanted. All the child objects
> implement serializeable, extend nothing, and know nothing of struts.
> 
> This is all elegantly managed in the JSP's with the use of the
> handy-dandy nesting extension. :)
> 
> That's my two cents.
> If you want the code for what I just blabbed on about, mail me...
> [EMAIL PROTECTED]
> 
> Arron.
> (theKM*)
> * I think, therefore, I nest ;)
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

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

Reply via email to