struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank W. Zammetti" <fzli...@omnytex.com>
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 <fzlists@omnytex.com>:
>> 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

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: fzammetti@hotmail.com
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 - http://javawebparts.sourceforge.net
  Supplying the wheel, so you don't have to reinvent it!


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message