You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by legol <le...@poczta.onet.pl> on 2007/08/09 11:41:37 UTC

Uploading files without page reload

Hi all,

I have problem with uploading files. My uploading file form is placed in
modal window and after submitting comunicate appears that modal window will
be closed. What I want is situation when after submitting modal window is
still visible. The best solution would be not reloading page but i read
somewhere that it is impossible  to upload file via ajax. I tried to do
something with PageParameters but to show modal window AjaxRequstTarget. 

Pls help.
-- 
View this message in context: http://www.nabble.com/Uploading-files-without-page-reload-tf4241610.html#a12069395
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Uploading files without page reload

Posted by Paolo Di Tommaso <pa...@gmail.com>.
I've done that having the upload form specifying an hidden iframe as target
and - above all - having the following code in the Form#onSubmit() method

            // Tell Wicket we're going to do the redirect ourselves.
            getRequestCycle().setRedirect(false);
            // Make sure no output for the current cycle is ever sent.
            getRequestCycle().setRequestTarget(
EmptyRequestTarget.getInstance());



Paolo

On 8/9/07, Al Maw <wi...@almaw.com> wrote:
>
> legol wrote:
> > Hi all,
> >
> > I have problem with uploading files. My uploading file form is placed in
> > modal window and after submitting comunicate appears that modal window
> will
> > be closed. What I want is situation when after submitting modal window
> is
> > still visible. The best solution would be not reloading page but i read
> > somewhere that it is impossible  to upload file via ajax. I tried to do
> > something with PageParameters but to show modal window AjaxRequstTarget.
> >
> > Pls help.
>
> The only way to do this, I think, is to embed your file upload inside an
> iframe. That way, you're doing a proper page submit.
>
> Regards,
>
> Al
> --
> Alastair Maw
> Wicket-biased blog at http://herebebeasties.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Uploading files without page reload

Posted by Al Maw <wi...@almaw.com>.
legol wrote:
> Hi all,
> 
> I have problem with uploading files. My uploading file form is placed in
> modal window and after submitting comunicate appears that modal window will
> be closed. What I want is situation when after submitting modal window is
> still visible. The best solution would be not reloading page but i read
> somewhere that it is impossible  to upload file via ajax. I tried to do
> something with PageParameters but to show modal window AjaxRequstTarget. 
> 
> Pls help.

The only way to do this, I think, is to embed your file upload inside an 
iframe. That way, you're doing a proper page submit.

Regards,

Al
-- 
Alastair Maw
Wicket-biased blog at http://herebebeasties.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org