cancel
Showing results for 
Search instead for 
Did you mean: 

"Normal" events

faebulicious
Explorer
0 Kudos

hi all,

is there a possibility to handle "normal" events raised by a class instance using the directive "raise event xy" (sender) respectively by the handler method and the directive "set handler xy for abc"?

i have a sapgui based cockpit, which consists of hundreds of classes and which uses events for interoprationen between the different components. i'd like to adapt this framework to web dynpro, but i did not yet find a way to listen to these event.

any ideas?

thx in advance

fabian

Accepted Solutions (0)

Answers (2)

Answers (2)

faebulicious
Explorer
0 Kudos

if you display your wd application in a html viewer this is started in a seperate context, you cannot not communicate between these two objects. whenever you use a html viewer this just starts an inplace instance of internet explorer and you're completely loosing control, when you load an external resource (which a wd application acutally is). if you're loading an internal resource you can handle events from the display html page (posting data, link click).

i hope it helps!

florian_halder
Participant
0 Kudos

Hi,

thanks for your quick response. As I started trying to embed the web dynpro, I found this example program SAPHTML_EVENTS_DEMO with embedded html page so I thought that it maybe works also with web dynpro.

It's a pity that there is no way to get a event from wd.

Regards Florian

faebulicious
Explorer
0 Kudos

this is not a problem of wd. its just a problem of the "external ressource" you're displaying in your gui control.

cheers

florian_halder
Participant
0 Kudos

..yes, but I cant display wd as internal source of my gui control.

regards Florian

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

We used to have a framework for throwing events between WDA and SAPGUI when WDA is running with the HTML control. You might even find references to this framework in some documentation or examples in older materials. However support for this solution has been revoked and the necessary classes removed in later support packages/enhancement packages. In general it is not recommended to run WDA within the SAPGUI. General integration of the two technologies should be done via NetWeaver Portal and/or NetWeaver Business Client.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

You can't mix Web Dynpro events and ABAP OO events directly. You can still have events within normal ABAP classes - say in the assistance class for instance. Say for instance you have an event handler method in the assistance class. It could respond to an event raised in the OO framework of some other processing class and could in turn call methods of the WD Component if it had been passed a reference to the WD Component object.

Keep in mind that you can't force any UI events (like in SAPGUI Control Programming) nor can you force start or disrupt the Web Dynpro Phase Model.

faebulicious
Explorer
0 Kudos

hi thomas

thanks for your reply. that is exactly the approach i had in my mind, but i thought maybe there is an easier way.

greets fabian

florian_halder
Participant
0 Kudos

Hi thomas,

I've understood correctly that a assistance class can be used to communicate between SAPGUI and WD?

I have almost spend two days for searching after a solution about this, but couldn't find one, yet.

Because I don't know how to exchange a object reference between SAPGUI und WD.

I tried shared objects, but there I can't store a object reference.

If I understood you correctly, my assistance class handle the event from the OO Framework (SAP GUI) and call a method of my web dynpro component. But therefor my assistance class needs the object reference which raise the event so that the event handler in the assistance class can be registred. correct?

How can I pass this reference to my assistance class?

Can I create a instance of my assistance class in OO Framework (SAP GUI) an use the same instance in my web dynpro?

Thanks,

Florian

florian_halder
Participant
0 Kudos

Hi again,

After reading your post 25 times, I think I misunderstood your answer.

It only works if I call the framework in my assistance class. correct?

But what I want to do, is to start the web dynpro application in a cl_gui_html_viewer oder cl_guil_wdr_viewer and handle a event of my web dynpro in my sapgui. I have read in another post of you, that the class CL_WDR_SAPGUI_INTEGRATION2 is no longer supported so I thought I could do a workarround for handling events.

I need only one event from the web dynpro that the sapgui know that there is new data or something else...

Regards Florian