struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank W. Zammetti" <>
Subject Re: Result types for S1
Date Thu, 13 Dec 2007 14:20:13 GMT
Hi Antonio,

Antonio Petrelli wrote:
> 2007/12/13, Frank W. Zammetti <>:
>> return mapping.findForward("JSONResultType");
> I don't like this syntax, because it mixes the concept of forward (to a
> page) with the rendering of the ActionForm. Probably a more specific
> ActionMapping method, or different types of ActionForwards, could be better.

So you'd rather see something like:

return mapping.renderResult("JSON");

...or maybe doResult()?

If so, that's not bad at all... I like that better actually because then 
I think I just need to modify ActionMapping, none of the chain Commands, 
and so long as the class implementing the JSON rendering returns null, 
then everything after the Action execution works just like always.  It's 
actually *less* intrusive in some ways, which was one of my goals.

> Antonio


Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
AIM/Yahoo: fzammetti
Author of "Practical Ajax Projects With Java Technology"
  (2006, Apress, ISBN 1-59059-695-1)
and "JavaScript, DOM Scripting and Ajax Projects"
  (2007, Apress, ISBN 1-59059-816-4)
Java Web Parts -
  Supplying the wheel, so you don't have to reinvent it!

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message