on 02-07-2006 10:28 AM
Hi,
I'm using a FileDownload UI-Element and it works fine. This FileDownload is placed in a popup wich I want to close automatically when the user clicks the FileDownload-Link. But FileDownload has no property like onClick or an eventHandler.
Any idea how to achive this?
Thanks in advance
Jan Hempel
Silly me.. No request for file download.. so that code wont work.
Extremely sorry.!
And there is no other alternative.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Assuming that file download is the only processing you are doing in the external window..
you can give this a try..
store the window instance in the controller context.. and check if its null in wdDoPostProcessing ..if its not NULL close it.
In wdDoPostProcessing
/* check if window instance is created*/
if(wdContext.currentContextElement().getWin()!=null){
/*
* Check if this request response cycle for creation of Window
* If yes , CanDelete is false. Dont delete the window instance.
* Initial Value of CanDelete is false.
* CanDelete - boolean attribute
* win - Attribute which stores window instance
**/
if(wdContext.currentContextElement().getCanDelete())
{
wdContext.currentContextElement().getWin().close();
wdContext.currentContextElement().getWin().destroy();
}
/*
* Set the CanDelete to toggle , so that we can delete it
* in the next req-res cycle if it has been created.
*
**/
wdContext.currentContextElement().setCanDelete(!wdContext.currentContextElement().getTest());
}
.
This is based on the fact when a req- response cycle is carried on and if the window is already created.. the request is because of the click of FileDownload UI. So the window can be closed.
Regards
Bharathwaj
Code added. Bharathwaj
Message was edited by: Bharathwaj R
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
As FileDownload UIE doesnt have any onClick property u cannot trigger an event. The alternative for u can be, to provide a close button in the pop up window.
regards,
Piyush.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.