on 08-09-2007 3:48 AM
Hi,all,
I want to raise a self-defined event with parameters in one of my method ,how to do that?Thanks
Hi Ray,
If your event name is MYEVENT and the parameter name is MYPARA and the value you want to pass to this parameter is L_PARAVALUE, use the following -
wd_this->fire_myevent_evt( mypara = l_paravalue ).
If the event is to be raised in an a view, then you need to get the component controller instance first and use it instead of wd_this.
Also, this can be obtained directly by clicking on the WD Code Wizard ->Radio button for raise event->selecting your event.
Regards,
Neha
<i><b>PS:Reward if helpful</b></i>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In your component controller, there will be a tab named 'EVENTS'. In this tab, you can add your own events. There itself, in another table below, you will be able to see the list of parameters the event takes as input. Add your parameters there.
In your view, fire the event using wd_comp_controller->fire_<event name>_evt( <parameters> ). The method call will be similar to firing a plug.
Hope this helps.
Regards
Nithya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In your component controller, there will be a tab named 'EVENTS'. In this tab, you can add your own events. There itself, in another table below, you will be able to see the list of parameters the event takes as input. Add your parameters there.
In your view, fire the event using wd_comp_controller->fire_<event name>_evt( <parameters> ). The method call will be similar to firing a plug.
Hope this helps.
Regards
Nithya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.