> Dmitri,
>
> I ~really~ like the way this Action works.
>
> * It keeps control in the Struts-config, and does not embed presentation
> details into Action source code.

How are presentation details embedded in the LookupAction you posted and my
similar code?  Its just a "key" that it exposes, which is a bridge between
the view and the controller, much like an ActionForm is also.

> * A single mapping could dispatch every HTML form using a given
> ActionForm bean. Or, one could choose to use more mappings and fewer
> local forwards, as preferred.
>
> * Each local forward can go to a different ActionMapping, or to the same
> one with different query strings, or any combination of either approach.

You guys sure do like big ugly struts-config.xml files!

I still feel (and of course this is a preference issue at this point) that
its bordering on, if not already past, putting business-specific logic in
struts-config by doing this kind of thing.  But have fun with this if you
like!  :)

> * It is easily adapted for those nasty image buttons and also shows when
> they are being used.

Indeed.  I enjoyed Dmitri's stuff, which gave me ideas for enhancing my way
by having a base class automatically deal with the ".x" stuff as well.

A couple of comments/questions on Ted's LookupAction:

- Any particular reason why the "last one wins" in your loading of the key
mappings?  Ideally there would not be duplicates, but I prefer the first one
wins (although I have no strong preference, it just seems friendlier to
allow the first one for some reason).

- Why use the response.sendError?  I realize this is done elsewhere in
Struts, but I much prefer to allow exceptions to climb back up and let
higher layers deal with them if possible, and having it kick back to the JSP
page and letting the errorPage directive catch it and forward on would be my
preference.  Therefore I like throwing a ServletException better.  Any other
pros/cons to either approach?

- Any preference to the position of the "key" parameter on the template
patternered 'perform' method?  I put mine first, and you switched yours to
last.  I have no preference, just curious on why the switch.

    Erik



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

Reply via email to