On Mon, February 14, 2005 12:27 pm, Don Brown said:
> As for 2), users can use normal actionforms, _or_ simply define setters
> on their POJO action class.  In the latter case, Struts, behind the
> scenes, could create a LazyDynaActionForm, and use it to run through
> validation, then if successful, use it to populate the POJO action.
> Therefore, in essence, we kept ActionForms, yet made them automatic.

What validation would be performed in such a case?  If you are saying
create this form on-the-fly just so that Struts can run through the same
general procedure, that's reasonable.  However, if the point is just to
have a class on which we can call a validate() method, wouldn't it be
better to just assume that method exists in the POJO Action?  Well, not
ASSUME it... it would reflectively be checked and if it's there it's
called, if not we do the equivalent of assuming no validation failure and
continue on.

What I'm getting at is that the above sounds like a bit more work than
really needs to be done... If we treat a POJO Action as a bean (we'll
assume it still must follow the bean spec), then we can just populate it
directly, and call validate() before execute(), assuming it exists.  That
way people can encapsulate forms with Actions if they want, or keep them
separate, completely at their disceretion.

> Adding to 3), it would be interesting to add "dialog" scope, something
> Shale is working on for a scope that is for a logic process where
> multiple instances might exist in a single session (think browser
> cloning where two of the user's browsers are going through the same
> workflow).

Here's a possibly more powerful idea... how about the idea of
"transactional scope"?  Just like in JDBC, the developer would at some
point "start" a transaction, say on an initial Action that populates the
first page of a wizard flow, then at some point "stops" the transaction,
which clears out the objects held in that scope.

The benefit here is that you have something "in between" request and
session scope, yet not as narrowly-defined as dialog scope (or, at least
it SOUNDS narrowly-defined to me when I hear "dialog scope")

> Now that I write this, I see Frank suggested the same "method"
> attribute.  Great minds think alike :)

Or two minds that are WAY off base to the same degree :)

I'll go with your conclusion though!!

> Don

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

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

Reply via email to