on 06-06-2005 8:14 AM
Hi,
I tried to use custom events in a WebDynpro Development Component.
To do this, I created an Event in "component one" of my project. I tried to fire this event with:
"wdThis.wdFireEventValidatePassword();"
In "component two", of the same project I tried to implement a event handler. I created this handler in with the Methods-Tab, within the "component interface controller", of "component two".
I did not more. I thougt, that with "wdFireEvent" from Comp1 the EventHandler in Comp2 would be called, somehow.
But blame me, nothing happend.
Can anybody give me an example, how I can "Fire" a event in one component, and react in an other component??
Thanks
Richard
Hi,
To access methods and events from other components(comp1) we have to include that component(comp1) in the used webdynpro components of the present component(comp2).
Map the interface controller of comp1 to the controller of comp2. Add the comp1 controllers in the required controller's of comp2 view.
Now you will be able to access the events and methods in comp1 from comp2 .(The functions and events in interface controller alone will be visible from comp2)
Regards
Bharathwaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
thanks for your answers. I followed krish's step by step procedure an it works. What I did wrong, was that I tried to implement the event handler in the component interface of the second component. If I just put it into the view Controller it works, so I can continue.
There is only the question left, why the event handler couldn't catch the event from IC of the second component?
Thanks
Richard
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi create a event in component 1 and call this event in a method some times this firing dosent happen in wdDoInit
so try firying this in some custom method and in Component 2 create a event Handler and subscribe to this Method in the component 2 and tr printing some message
for example i have create a method in my interface contoller and called this method from my view controller.
in the method of my interface controller i have fired an event and in the view controller of component 2 i have created an event Handler and subscribed to this event. so this event handler in component 1 is automatically called when the Method of the Interface Controller in Component 1 is called.
ok here is the sep by step procedure
Component 1
1. create a method in interface Contoller.
2. create a event in interface contoller.
3. call this event in the Interface contoller Method
4. call this interface controller Method from the viewController.
component 2
1. create an Event Handler in viewContoller of component2 and subscribe to this event.
2. print some message in this event and see if results are getting displayed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.