cancel
Showing results for 
Search instead for 
Did you mean: 

How to use an existing WD view in an External Window

yasu_ramaiah
Explorer
0 Kudos

Hello !!!

Is there a solution to the below problem.

Say "view1", "view2" are embeded in "window1". Now create a new window "window2" and embed the existing view "view1" into "window2". Now show the "window2" as a popup when a button in "view2" is pressed. I am using the following code

IWDWindowManager winMgr=wdComponentAPI.getWindowManager();

IWDWindowInfo Win2Inffo=wdComponentAPI.getComponentInfo().findInWindows("window2");

IWDWindow Win2=winMgr.createWindow(Win2Inffo,true);

Win2.open();

but than I get the following error

com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Duplicate instance exception: There is already an instance of view view1 in component NotificationAdminComp.

at com.sap.tc.webdynpro.progmodel.controller.Component.addViewController(Component.java:129)

Any help will be appreciated/rewarded a lot.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Duplicate view usage is not possible. But you can create a component for the view and create multiple component usages.

Armin

yasu_ramaiah
Explorer
0 Kudos

Hello Armin,

Thanks for the reply. The reason for reusing the existing view is like this...

Say the user is editing some information in view1 and say by pressing a button in view2 triggers an outbout plug and which changes the view1 information. So the best option here would be popup a window withe view1 and ask the user whether to save or discard the changes. In this case it wont be good to create a diff component.

So is there any work around

-:)

former_member182372
Active Contributor
0 Kudos

Hello jasu,

For confirmation purposes you can use standart method from dynpro

createConfirmationWindow

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/javadocs/nw04/sp12/web dynpro runtime environment/com/sap/tc/webdynpro/services/session/api/iwdwindowmanager.html

Best regards, Maksim Rashchynski.

yasu_ramaiah
Explorer
0 Kudos

Hello Maksim,

Thanks for thr help, I knew about the confirmationdialog, in me view confirmationdialog is not the best option.

Former Member
0 Kudos

Hi Yasu

What is the usecase of presenting View1 as confirmation window instead of using another view.

Regards

Pran

yasu_ramaiah
Explorer
0 Kudos

Hello Pran,

Absolutely we can use another view but dont you think it is good to use the existing component. we think it is redundant and maintainance would be a problem.

Thanks

Yasu Ramaiah

Answers (0)