on 12-03-2007 4:11 PM
Hello Friends,
I am trying to implement a dialog as defiend in PDF doc ( Dialog Boxes in Web Dynpro Applications ) http://209.85.129.104/search?q=cache:fA--oXHmRTEJ:https://www.sdn.sap.com/irj/servlet/prt/portal/prt...dialogsboxeinwebdynproapplications&hl=en&ct=clnk&cd=1
In this document, he mentioned how to store the instance of the dialog window in context in order to destroy later on:
wdContext.currentPopupElement().setWindowInstance(window);
( I have also created the value node popup and its value attribue WindowInstance of type IWDWindow , but when I use this line of code, i.e wdContext.currentPopupElement().setWindowInstance(window);, I got null pointer exception,
if I comment this line, I can open the window dialog, ( which atleast make me confirm that my window obj is not null ) dont know why I am getting this exception ...
Any idea....
Regards,
Thanks sumit for your clarification and Armin for your resonse ...
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Now instead of this:
wdContext.currentPopupElement().setWindowInstance(window);
I used this.
wdContext.createPopupElement().setWindowInstance(window);
I did not get the null pointer exception on this line, however when i try to retrieve the instance like this:
IWDWindow window = wdContext.currentPopupElement().getWindowInstance();
Got null pointer exception ?
any idea why I am getting null pointer exception ?
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shah,
NPE stands for NullPointerException. Apart from that there r 2 ways to do the thing , u were trying.
1. U create windowInstance attribute in root context directly, in that case u don't have to set the cardinality explicitly, what armin mentioned.
2. U can create a node & inside that u can create ur windowInstance attribute, in that case u have to set the cardinality 1:1 , bcos when u access current<node>Element, it has to be initialized. what u have done.
regards
Sumit
Correct, and
3. As the popup is closed from an action handler of another view (e.g a view inside the popup containing a "Close" button), the context attribute must be created in a common controller (component or custom controller) and mapped from the view that openes the popup and from the view that contains the close-action.
Armin
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
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.