|
From: Colin S. <col...@ex...> - 2004-11-10 05:03:58
|
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></property>
>
>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
>
>
|