on 10-08-2010 11:54 AM
Hi,
i am having a event in component controller. event handler is made in first view.
Now how can i fire the event from second view, so that event handler in first view wil get trigered.
Regards,
Pankaj Aggarwal
Hello Pankaj,
When you have created the event handler in first view, you have to specify the event defined in the component controller.
Then in second view, just do the following to fire the event:
DATA lo_componentcontroller TYPE REF TO ig_componentcontroller .
lo_componentcontroller = wd_this->get_componentcontroller_ctr( ).
lo_componentcontroller->fire_evt( ).
evt is the event name in the above code.
the event handler in the first view gets executed automatically when you fire the event.
Hope this helps!
Regards,
Srilatha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I am not able to fire the event. the error i m getting is fire_event is not known. fire_event is the name for the event.
I can call the event handler with this piece of code if event handler is in component controller.
but my que is how can i fire the event of component controller if event handler is in view. Please suggest.
Hi pankaj,
To fire a event the syntax is
fire_<event_name>_evt() is the syntax.
So replace <event_name> with your event name in the controller.
IF it is from component controller then the code should be
wd_comp_controller->fire_fire_event_evt( ).
However the event handler should be active to listen and proceses this event.
User | Count |
---|---|
88 | |
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.