cancel
Showing results for 
Search instead for 
Did you mean: 

How to raise a self-defined event with parameters in program

Former Member
0 Kudos

Hi,all,

I want to raise a self-defined event with parameters in one of my method ,how to do that?Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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>

Answers (2)

Answers (2)

Former Member
0 Kudos

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

Former Member
0 Kudos

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