on 01-25-2006 4:09 AM
hi every one,
i am setting application properties like expirationTime with some value... how to get these values in my coding....
my requirement is, when i am closing my application in the browser, i need to store the time application closed.....and where can i code this....
how to perform some actions before close of application...
Hi Sunil,
You can retrieve the application properties in your code by:
IWDApplicationInfo application = wdComponentAPI.getApplication().getApplicationInfo();
String value = application.findInApplicationProperties("<property name>").getValue();
for eg: you can retrieve expiration time as:
application.findInApplicationProperties("sap.expirationTime").getValue();
But expiration time is the time after which the application expires and has nothing to do with the real time
About the application closing, as far as I know there is no event in webdynpro to capture the window closing event. So it depends on how the user closes the application. If he closes the application from within it using some button or link, then you can very well write the required code there. If he closes the browser directly, then I don't think you can handle that.
Hope this helps,
Best Regards,
Nibu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
to perform some action before closing can be done in wdDoExit() method of controllers......
for accessing the applicaton properties here is the link....
for the time functionality u can get the time of server in the wdDoExit() method...
new Date(System.currentTimeMillis());
Regards,
yashpal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sunil,
If you have noticed, there's a method
wdDoExit()
in your view's implementation. That is where you should set the expiration time.
I think you will need to set some persistent application properties.
IWDApplicationPropertyInfo tim = wdComponentAPI.getApplication().getApplicationInfo().findInApplicationProperties("EXPIRATIONTIME");
if(tim != null)
tim.setAttributeValue("EXPIRATIONTIME","<your value>");
Regards,
Satyajit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.