Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Component usage and creating popup windows dynamically

Hi folks,

I have created a webdynpro component A which has 2 windows.

Window 1 has somewhere code in a view to call window 2 as a popup window.

It works all fine when just testing the component.

Now I have another component B which is basically the main menu of the application - in that menu I have 2 links which should show window 1 and window 2 of the same component A. Works fine.

But my popup window doesn't work anymore ... Well it doesn't work when I allready showed the referenced window via the second link.

Looking at the "createWindow" method it says that " ... a creation of a new instance of a windowInfo is only possible, if it doesn't exist any other window instance with the same windowInfo (including interface views, which are embedded in other component instances). ".

So I changed my referencing model from "createondemand" into "manual" and

used the following code with the idea that I created 2 different instances of the same component and that I would be fine ( added the delete part later on as only creating didn't work ):

if (wdThis.wdMyComponentUsage().hasActiveComponent())

{

wdThis.wdMyComponentUsage().deleteComponent();

}

wdThis.wdMyComponentUsage.createComponent();

But doesn't work either ... I think I am not completely clear on the idea here ...

Basically I want 2 independant instances of the same component and I don't want them interfering on window usage ... so I can happily open my popup window ...

Is that possible ? According to the help I am not able to open the window as it is allready opened somewhere else - great - but I deleted the component first so I would think that would remove the window usage as well ???

Thanks,

Steven

Not what you were looking for? View more on this topic or Ask a question