struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Jouravlev" <jmi...@gmail.com>
Subject Re: Struts and AJAX
Date Mon, 03 Jul 2006 20:41:01 GMT
On 7/3/06, Frank W. Zammetti <fzlists@omnytex.com> wrote:
> draegoon Z wrote:
> > Sounds great so far, but I think I lost you on the first part.
> > Let's work through a simple problem...
> >
> > Let's say I have in my struts-config:
> >
> > <action path="/my_action" forward="tile.my_action" />
> > <action path="/success" forward="tile.success" />
> > <action path="/error" forward="tile.error" />
> >
> > <action name="MyForm" path="/process_my_action" input="/my_action.do"
> > scope="request" type="com.draegoonZ.action.MyAction">
> >     <forward name="success" path="/success.do" />
> >     <forward name="error" path="/error.do" />
> > </action>
> >
> > First, what happens if MyForm just simply returns an ActionError?
>
> MyForm, which I assume extends from Action, would have to return an
> ActionForward, or null... if null, then the response would have to be
> fully formed by the Action, otherwise it presumably returns a forward to
> a JSP that renders some response.  That JSP would have to make use of
> the ActionErrors, and render a response appropriate for what you want to
> happen on the client, whether that's updating a <div>, popping an
> alert(), or something else.
>
> I feel like I'm not understanding what your getting at though :)

Frank, please ignore my ignorance, if I understand correctly, an
Action still returns a full page, but your JS engine parses the
response and pulls out only relevant "ajaxified" parts and replaces
them in a page? So, if I need to print out error messages, I just need
to mark <html:errors/> tag with <ajax:enable /> ? What if I print
errors separately for every input field, will this still work?

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


Mime
View raw message