I'm sorry, I completely missed your original question. I'm not aware of a
"cleaner" way to do what you're trying. You might have to manually add them
like you're presently doing. The RedirectView class doesn't seem to have any
special logic to handle , say , one key to a List of params.
Sanjiv
On 12/11/06, Luiz Fernando Rodrigues <[EMAIL PROTECTED]> wrote:
ok, but what if I want to set several values to a single parameter? If
I do like this:
for(int i=0; i<lojasIds.length; i++)
{
model.put("lojaId", lojasIds[i]);
}
the keys will be overwritten and only the last value will be considered.
Luiz
On 12/11/06, Sanjiv Jivan <[EMAIL PROTECTED]> wrote:
> Just put the params in your model map. Spring will convert them into
> redirect request params. Ofcourse you need to make sure you only put
string
> param values in your model.
>
> Map model = new HashMap();
>
> model.put ("busca, "true");
> model.put("editLojaPV", "true");
> ...
> return new ModelAndView("redirect:/resumo/produtos.html",
> model);
>
>
> Sanjiv
>
>
>
> On 12/11/06, Luiz Fernando Rodrigues <[EMAIL PROTECTED]>
wrote:
> >
> > Hi,
> >
> > I'm trying to redirect my view using the redirect prefix in
> > ModelAndView passing some parameters. My problem is that I want to
> > pass in a single parameter several values (like check boxes). I'm
> > currently solving this problem creating a String where all the url and
> > parameters are defined:
> >
> > String args = "";
> > for(int i=0; i<lojasIds.length; i++)
> > {
> > args += "&lojaIds="+lojasIds[i];
> > }
> > args += "&busca=true";
> > args += "&editLojaPV=true";
> > args +=
> "&departamento="+request.getParameter("departamento");
> > args += "&familia="+request.getParameter("familia");
> > args += "&colecao="+request.getParameter("colecao");
> > args += "&fornecedor"+request.getParameter("fornecedor");
> >
> > return new
> ModelAndView("redirect:/resumo/produtos.html?"+args);
> >
> > Is there some cleaver way to pass this parameters? I tried to use the
> > addObject method, but I had no success informing the lojaIds String
> > array, since Spring invokes the toString method from the array.
> >
> > Luiz
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]