|
From: Dion A. <di...@al...> - 2004-11-10 06:20:27
|
Colin -
You are the man :)
return new ModelAndView(new RedirectView(getSuccessView(), true), "id",
theId));
Is all I needed.
Cheers,
Dion
-----Original Message-----
From: Colin Sampaleanu [mailto:col...@ex...]
Sent: Tuesday, November 09, 2004 11:03 PM
To: spr...@li...
Subject: Re: [Springframework-developer] successView changes
Dion,
I presume you are actually using this view as a RedirectView? That's the
only thing that makes sense, given that you're playing around with the name
as if it's a URL, and the fact that it has .html at the end; I presume this
is mapped to another controller?
In any case, you shouldn't be manipulating the view name at all. What you
should be doing is just setting the id as a model object, and letting
RedirectView build the URL for you:
return new ModelAndView(new RedirectView(getSuccessView(), true), "id",
theId));
Now do you have a problem with the controller itself knowing the name of the
param?
Colin
Dion Almaer wrote:
>Hi guys -
>
>I run into the following use case a lot:
>
>- Create a new FOO
>- On success I want to SHOW that FOO
>
>Ideally I would want to:
>
><property
>name="successView"><value>viewFoo.html?id=$request['id']</value></prope
>rty>
>
>viewFoo.html?id=$request['id]
>
>Could of course be something else like: id=$id or
>$request.getParameter("id") or whatever.
>
>But it would be really nice to be able to do something like this
>instead of having my controller do a
>
>.... getSuccessView() + "id=" + theId ....
>
>If there another clean way to do this that I am missing?
>
>Cheers,
>
>Dion
>
>
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's
Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|