hi,

i was Show the modal dialog with a page. After i clicked on the submit
button, i will call a function to generate the report in local pc and then
prompt out to let the user download the file directly.. the problem here is
STEP 2 is not functionally. Even i put the STEP 2 after STEP 3 also the
same. Is that the ModalWindow.close(target) is the last action for the modal
window? 

In common flow, i will think it that after submit button is clicked. it will
generate the report follow by close modal window and the prompt another
window for the user download, am i right ?

anyone hav the good idea for it ?

thanks

// partial of the submitButton  code
 submitButton = new AjaxSubmitButton("submitButton", this){

  @Override
  protected void onSubmit(AjaxRequestTarget target, Form form) 
  {
       STEP 1) generate the report and keep a copy in local pc
       // exportFileAs PDF (....);       

        STEP  2) download the report
        ResourceStreamRequestTarget fileTarget = new
ResourceStreamRequestTarget(new
                                FileResourceStream(new 
wicket.util.file.File(filename)));
        fileTarget.setFileName(report_name);
        RequestCycle.get().setRequestTarget(fileTarget); 
        
       STEP  3) close the modal window                 
        ModalWindow.close(target);
 }
};
-- 
View this message in context: 
http://www.nabble.com/load-other-action-after-ModalWindow.close%28target%29-tf4048160.html#a11498643
Sent from the Wicket - User mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to