Skip to Content
author's profile photo Former Member
Former Member

dialog, + problem in storing window instance in context

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/prtroot/com.sap.km.cm.docs/library/uuid/42af9f90-0201-0010-6099-ba67e5426bdfdialogsboxeinwebdynproapplications&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,

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 03, 2007 at 04:19 PM

    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,

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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

  • author's profile photo Former Member
    Former Member
    Posted on Dec 04, 2007 at 03:42 PM

    Thanks sumit for your clarification and Armin for your resonse ...

    Regards,

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.