struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hubert Rabago <jakartau...@yahoo.com>
Subject Re: Persisting Messages/Errors when redirect="true"
Date Thu, 12 Feb 2004 22:05:05 GMT

It's at http://www.rabago.net/struts/redirect/ .

I think I use this similar to how you described your situation.

I have an Action which would do an insert/update/delete and on a successful
operation I like to redirect to a list/view page with an success/error
message.  That way my users don't get that annoying "Re-post form?" box when
they refresh, and I'm not chaining actions that do different things.

Not sure if it matters to you, but the last guy who asked for it (Manjunath)
needed several error messages with their property names preserved.  I didn't
need that but promised him I'll change it for him.  If you need several error
messages with different property names, I'll probably have that version ready
next week.  If not, this should work fine for you.

 - Hubert

--- David Erickson <derickson@cmcflex.com> wrote:
> Ya I'd be interested to see your code if at all possible =)
> Thanks,
> David
> 
> ----- Original Message ----- 
> From: "Hubert Rabago" <jakartauser@yahoo.com>
> To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
> Sent: Monday, February 09, 2004 7:49 PM
> Subject: Re: Persisting Messages/Errors when redirect="true"
> 
> 
> > There's no built-in support for this at the moment.  I add code to my
> > projects to add that support.  I can share the code with you if you want.
> >
> > - Hubert
> >
> > --- David Erickson <derickson@cmcflex.com> wrote:
> > > Is it possible to persist Messages/Errors around your site through the
> > > request when setting redirect="true" on an action mapping?  An example
> I
> > > have right now is I have a delete action that forwards to a
> listContacts.do
> > > action on success.. however its persisting url parameters from my
> delete
> > > request that is interfering with my listcontacts action. If i set
> > > redirect='true' though it empties my request =(.  Help!
> > > Thanks
> > > -David
> > >
> > > (Plus I can't be the only one forwarding from action->action.. and it
> gets
> > > really annoying seeing the old action url listed in the url even though
> > > your
> > > on a new one)
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> > >
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Finance: Get your refund fast by filing online.
> > http://taxes.yahoo.com/filing.html
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html

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


Mime
View raw message