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]