On 11/23/2004 02:20 PM Joe Germuska wrote:
Your action isn't executed if validation fails. However, the validation is performed on a second request, so the object placed into the scope before the form was presented is no longer there.

If your categories are really relatively static, consider managing them in Application scope rather than request. I often have one or more plugins which initialize common menus like states and provinces or months of the year and place them into the application scope (I like to use the DigestingPlugIn). Your code doesn't look like there's anything particularly request-sensitive about the category tree.

Some people make lists a property of the form itself. This is also one of the core use cases for some kind of view controller registered against the input forward's path, which is one of my goals to implement in a Struts 1.3.x timeframe.

Joe

Joe,

I hope you don't think I'm labouring a point after the big discussion last week, but regarding a view controller registered against the input forward's path, I just don't get the paradigm.

It seems like an unnecessary complexity when you can do what Matt suggested and point the input attribute at a 'loader' action mapping.

Having a loader action decouples it from the validation+processing action, which seems friendly and OO to me. Then you can use that loader action from anywhere - can you say the same about your view controller registered against the input forward path?

You have to do the loading without validation anyway, i.e. you need that first action. So how do you hook up your view controller to the loading action, or do you have some further mechanism that allows you to have only one action, tweaking validation on or off somehow?

Adam


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



Reply via email to