cancel
Showing results for 
Search instead for 
Did you mean: 

pop up window opening though its been destroyed

Former Member
0 Kudos

Hi All,

I opened the one pop up window, on clicking one button of that window that pop up window is getting closed because i destroyed that window instance. after some validations i have to show another pop up window. while this window is opening that old window is also opening with blank like bordered window. can any give solution for this.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Can u post the code which ur using... might be problem in coding.......

Former Member
0 Kudos

On clicking the button of the window this line will be executed

IWDWindow window = wdThis.wdGetESS_ShiftStandbyCompController().wdGetContext().currentContextElement().getWindowInstance();// to get window

window.destroyInstance();//destroying

wdThis.wdGetESS_ShiftStandbyCompController().wdGetContext().currentContextElement().setWindowOption("Yes");

wdThis.wdGetESS_ShiftStandbyCompController().setSwap(); //calling another method for validations

if validations are true

i am executing these lines

IWDWindowInfo windowInformation = wdComponentAPI.getComponentInfo().findInWindows("ConfirmWin");

IWDWindow confirmWindow = wdComponentAPI.getWindowManager().createModalWindow(windowInformation);

wdThis.wdGetESS_ShiftStandbyCompController().wdGetContext().currentContextElement().setConfirmWindowInstance(confirmWindow);

confirmWindow.show();

This is happening when i show this confirmWin window only, not in case when i am showing other windows.

Former Member
0 Kudos

Hi Ravi,,,

What is this getWindowInstance(); ???

Have u passed any window instances to it.. ??

Former Member
0 Kudos

i stored the instane of the window in the context of the component controller. that i was getting and using that i am closing and doing other validations

Former Member
0 Kudos

den the code is proper..... U got to look into the project.... just trace it....

Edited by: jaya_dolphin on Feb 14, 2011 11:46 AM

Former Member
0 Kudos

Ok Thank you for your reply. is there chance of getting window which is destroyed.

Former Member
0 Kudos

Hi All, thanks for your replies.

I want to give more information to clear this issue.

After destroying window A i am doing validations and if validations are succeded i am calling another window B to show the user immediately in one method itself, then window A instance is displayed back.

But i tried another way

After destrloying window A i put the all validations in one method. If all validations are succeded i am maintaining boolean value 'FLAG' to store success or false. i added one more button in the view to call the method to show window B basing on the FLAG value. in this case window instance is not coming.

but i have to do the functionality as in first case only.

Former Member
0 Kudos

May be followong offcial documentation

http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/903fed0d-7be4-2a10-cd96-9136707374e1

will help to create working case.

And then to find difference with it.

but worth try some else ways to reach appropriate behavior:

_______________

more concrete ways to check:

you may destroy current popup window from itself,

and system may look for that to not occur.

So that when destroying window, call method of the controller,

and destroy it from there.

________________

May occur interesting bag if blocking occur in controller as mentioned here::

So you can try to call method of destroying window from parent View.

_________________

As well for working from parent the controller well working method hide()

for window,

instead of destroy.

I think just some more resources it will take,

but reliable working may be good compensation for that.

Former Member
0 Kudos

Hi Ravi,

As I understand you have a method in window A which closes that window, makes some validations and then opens another window. If that's correct, try making the opening call from the the parent window, not from a method of the closed one.

Regards, Aldo.

Former Member
0 Kudos

Thanks for your reply

I am not doing validations from that window A. i just destroying window instance and calling controllers method where all validations will be done, on successfull validation i am calling another window(name : confirmWindow) to show. here its showing old window in dotted line witout any button or text. i am using three windows but its behaving like this when i call this confirmWindow only.

shreyas_pandya
Contributor
0 Kudos

Hi Ravi,

Try nullifying the window object just before calling it.

Something like, just before creating elements of a node, as a best practice we always invalidate the node.

Apply the same logic here.

Regards,

Shreyas Pandya