You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by jack jones <bs...@live.com> on 2009/04/03 00:21:10 UTC
Pop up window after file upload
Hi,
I am trying to create a pop-up window to display some feedback after a bulk upload. The pop-up window needs to be created using a submitLink not a BookmarkablePageLink, I have tried using a BookmarkablPageLink but you cannot not override the onClick() method, also it cannot be an ajax pop-up because I am using a file upload. The code would be something like this:
add(new SubmitLink("add"){ public void onSubmit() { FileUpload upload = fileUploadField.getFileUpload();
List feedback = myService.doSomethingWithUpload(upload); if(feedback.size()> 0 ) Create a popup window to display the feedback. }});
Do you know how this can be achieved?
Thanks in advance.
_________________________________________________________________
Rediscover Hotmail®: Get e-mail storage that grows with you.
http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Storage1_042009
RE: Pop up window after file upload
Posted by jack jones <bs...@live.com>.
Yes, that was my main problem I didn't have an AjaxRequestTarget to load the Modal window. I'll try using a AjaxSelfUpdatingtimer or lazyLoadPanel in the response page constructor.
Thanks for your reply.
> Subject: RE: Pop up window after file upload
> Date: Sun, 5 Apr 2009 22:30:30 +0200
> From: lindner@visionet.de
> To: users@wicket.apache.org
>
> Yes, I think this can't be done your way. You need an AjaxRequestTarget to open a ModalWindow. But I remember that it is not possible to upload a file with an AjaxSubmitButton.
> The only way I can imagine to realize such a behavior is to call setResponsePage after upload is done and do the trick in the ResponsePage constructor. E.g. by adding a AjaxSelfUpdatingtimer or use a lazyLoadPanel. Both provide you with an AjaxRequestTarget that can open a ModalWindow.
>
>
> -----Ursprüngliche Nachricht-----
> Von: jack jones [mailto:bshd123@live.com]
> Gesendet: Sonntag, 5. April 2009 22:06
> An: users@wicket.apache.org
> Betreff: RE: Pop up window after file upload
>
>
> No one has replied, does this mean it can't be done?
>
>> From: bshd123@live.com
>> To: users@wicket.apache.org
>> Subject: Pop up window after file upload
>> Date: Thu, 2 Apr 2009 22:21:10 +0000
>>
>>
>> Hi,
>> I am trying to create a pop-up window to display some feedback after a bulk upload. The pop-up window needs to be created using a submitLink not a BookmarkablePageLink, I have tried using a BookmarkablPageLink but you cannot not override the onClick() method, also it cannot be an ajax pop-up because I am using a file upload. The code would be something like this:
>>
>> add(new SubmitLink("add"){ public void onSubmit() { FileUpload upload = fileUploadField.getFileUpload();
>> List feedback = myService.doSomethingWithUpload(upload); if(feedback.size()> 0 ) Create a popup window to display the feedback. }});
>>
>> Do you know how this can be achieved?
>> Thanks in advance.
>> _________________________________________________________________
>> Rediscover Hotmail®: Get e-mail storage that grows with you.
>> http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Storage1_042009
>
> _________________________________________________________________
> Windows Live(tm): Keep your life in sync.
> http://windowslive.com/explore?ocid=TXT_TAGLM_WL_allup_1a_explore_042009
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
_________________________________________________________________
Quick access to your favorite MSN content and Windows Live with Internet Explorer 8.
http://ie8.msn.com/microsoft/internet-explorer-8/en-us/ie8.aspx?ocid=B037MSN55C0701A
RE: Pop up window after file upload
Posted by Stefan Lindner <li...@visionet.de>.
Yes, I think this can't be done your way. You need an AjaxRequestTarget to open a ModalWindow. But I remember that it is not possible to upload a file with an AjaxSubmitButton.
The only way I can imagine to realize such a behavior is to call setResponsePage after upload is done and do the trick in the ResponsePage constructor. E.g. by adding a AjaxSelfUpdatingtimer or use a lazyLoadPanel. Both provide you with an AjaxRequestTarget that can open a ModalWindow.
-----Ursprüngliche Nachricht-----
Von: jack jones [mailto:bshd123@live.com]
Gesendet: Sonntag, 5. April 2009 22:06
An: users@wicket.apache.org
Betreff: RE: Pop up window after file upload
No one has replied, does this mean it can't be done?
> From: bshd123@live.com
> To: users@wicket.apache.org
> Subject: Pop up window after file upload
> Date: Thu, 2 Apr 2009 22:21:10 +0000
>
>
> Hi,
> I am trying to create a pop-up window to display some feedback after a bulk upload. The pop-up window needs to be created using a submitLink not a BookmarkablePageLink, I have tried using a BookmarkablPageLink but you cannot not override the onClick() method, also it cannot be an ajax pop-up because I am using a file upload. The code would be something like this:
>
> add(new SubmitLink("add"){ public void onSubmit() { FileUpload upload = fileUploadField.getFileUpload();
> List feedback = myService.doSomethingWithUpload(upload); if(feedback.size()> 0 ) Create a popup window to display the feedback. }});
>
> Do you know how this can be achieved?
> Thanks in advance.
> _________________________________________________________________
> Rediscover Hotmail®: Get e-mail storage that grows with you.
> http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Storage1_042009
_________________________________________________________________
Windows Live(tm): Keep your life in sync.
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_allup_1a_explore_042009
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
RE: Pop up window after file upload
Posted by jack jones <bs...@live.com>.
No one has replied, does this mean it can't be done?
> From: bshd123@live.com
> To: users@wicket.apache.org
> Subject: Pop up window after file upload
> Date: Thu, 2 Apr 2009 22:21:10 +0000
>
>
> Hi,
> I am trying to create a pop-up window to display some feedback after a bulk upload. The pop-up window needs to be created using a submitLink not a BookmarkablePageLink, I have tried using a BookmarkablPageLink but you cannot not override the onClick() method, also it cannot be an ajax pop-up because I am using a file upload. The code would be something like this:
>
> add(new SubmitLink("add"){ public void onSubmit() { FileUpload upload = fileUploadField.getFileUpload();
> List feedback = myService.doSomethingWithUpload(upload); if(feedback.size()> 0 ) Create a popup window to display the feedback. }});
>
> Do you know how this can be achieved?
> Thanks in advance.
> _________________________________________________________________
> Rediscover Hotmail®: Get e-mail storage that grows with you.
> http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Storage1_042009
_________________________________________________________________
Windows Live™: Keep your life in sync.
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_allup_1a_explore_042009
Re: Pop up window after file upload
Posted by Kevin Logue <ke...@viableoptions.ie>.
It could probably be done using an AjaxSelfUpdatingBehavior, though
you'll need to off load the actual uploading to a separate thread. Once
the upload is complete set some flag/messages in the session and have
the behaviour show the modal window based upon this(could use a second
behaviour on the modal window to refresh its status). There's a few
tutorials on the web about creating a custom progress bar for uploading,
I think what you're trying to achieve isn't a million miles away from
it. However I'm relatively new to wicket so I'm unsure if this is the
best course of action(or if its even condoned!)
jack jones wrote:
> Hi,
> I am trying to create a pop-up window to display some feedback after a bulk upload. The pop-up window needs to be created using a submitLink not a BookmarkablePageLink, I have tried using a BookmarkablPageLink but you cannot not override the onClick() method, also it cannot be an ajax pop-up because I am using a file upload. The code would be something like this:
>
> add(new SubmitLink("add"){ public void onSubmit() { FileUpload upload = fileUploadField.getFileUpload();
> List feedback = myService.doSomethingWithUpload(upload); if(feedback.size()> 0 ) Create a popup window to display the feedback. }});
>
> Do you know how this can be achieved?
> Thanks in advance.
> _________________________________________________________________
> Rediscover Hotmail®: Get e-mail storage that grows with you.
> http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Storage1_042009
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus signature database 3984 (20090402) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>
--
Kevin Logue
[t] +353 (0) 42 939 1039
[e] kevin@viableoptions.ie <ma...@viableoptions.ie>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org