cancel
Showing results for 
Search instead for 
Did you mean: 

NWDS 7.3 - Popup Window Modal set propertie SetOnClose

0 Kudos

Hello,

I am developing ajavaapplicationinWebDynproNW7.3.Inthis applicationI am trying tocreate apopupwindow(modal) withthe close iconinthe upper right(as standard). But I'm getting the following error:

java.lang.ClassCastException: class
com.sap.tc.webdynpro.clientserver.uielib.standard.impl.TransparentContainer:service:tc~wd~webdynpro@com.sap.engine.boot.loader.ResourceMultiParentClassLoader@798429d2@alive
incompatible with interface
com.sap.tc.webdynpro.clientserver.uielib.standard.api.IWDWindowViewElement:service:tc~wd~webdynpro@com.sap.engine.boot.loader.ResourceMultiParentClassLoader@798429d2@alive

    at

com.indura.wd_popup.wd.comp.new1comp.PopupView.wdDoModifyView(PopupView.java:147)

if (firstTime){

   IWDWindowViewElement window = (IWDWindowViewElement) view.getRootElement();

   IWDAction okAction = wdThis.wdGetAPI().getAction("OK");

   window.setOnClose(okAction);

The following link is for version 7.1EhP1, but not useful

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a04870c5-749b-2b10-06ba-d25515ef3...

 

Best regards,

Sergio

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

You can also check these threads:

http://scn.sap.com/docs/DOC-2580

http://scn.sap.com/thread/931040

Any points appreciated.

0 Kudos

Teodor, thanks for your reply. I have no problem to close a popup window (modal). I need to display the standard icon popup windows closed (top right). I'm working on version7.3 touse the new features, but Ican not findgoodtipsfor doing so.

Best Regards,

Sergio

Former Member
0 Kudos

Hello Sergio,

You cannot cast root element in a view to window. The class of the view.getRootElement() is IWDTransperantContainer. To close the window you need to store it in the context in an attribute of type Window and when you click the close button to get the window from the context and call its hide method.

Best Regards,

Teodor

junwu
Active Contributor
0 Kudos

where you put those code?

read the doc carefully.....

0 Kudos

I do not understand you. I'm working on the method wdDoModifyView popup window. My version of NWDS is 7.3. The error I get is: ClassCastException. on line:

IWDWindowViewElement window = (IWDWindowViewElement) view.getRootElement ();

It is possible to do this?