You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Diego <di...@xeridia.com> on 2004/07/19 16:26:23 UTC

Fwd: Multipart forms

Hi! I have a problem when I want to get some parameters in the reset() method
of
an ActionForm.

If the form is a "normal" form, then I simply call
request.getParameter("myparameter") and the parameter is retrieved with no
problem.

But if the form is of type multipart, then I always get null. The parameter
table seems to be filled later, on the RequestProcessor. I need to get
parameters in the reset() method, specifically the "page" parameter, to deal
with checkboxes in my wizard-style multipage form.

How can I do it in the simplest way possible?

Thanks in advance.



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


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


Re: Multipart forms

Posted by Niall Pemberton <ni...@blueyonder.co.uk>.
You can't get them in the reset() method. Parameters in multipart requests
are processed later and made available by wrapping the original request in
MultipartRequestWrapper and  storing the "normal" request parameters in that
wrapper. Thats not done until the form is populated. The first chance you
get to do anything is in the form's validate method.

Niall

----- Original Message ----- 
From: "Diego" <di...@xeridia.com>
To: <us...@struts.apache.org>
Sent: Monday, July 19, 2004 3:26 PM
Subject: Fwd: Multipart forms


> Hi! I have a problem when I want to get some parameters in the reset()
method
> of
> an ActionForm.
>
> If the form is a "normal" form, then I simply call
> request.getParameter("myparameter") and the parameter is retrieved with no
> problem.
>
> But if the form is of type multipart, then I always get null. The
parameter
> table seems to be filled later, on the RequestProcessor. I need to get
> parameters in the reset() method, specifically the "page" parameter, to
deal
> with checkboxes in my wizard-style multipage form.
>
> How can I do it in the simplest way possible?
>
> Thanks in advance.
>
>
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>



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