cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding Events in webdynpro

Former Member
0 Kudos

Hi all,

I understood the concept of action,it is if we create action and assign it to any UI element ,then in "onactionmethod",we will write the required code.....,

but I am not able to understand the concept of event.

what is event?how does it work?how to handle it?

wdThis.wdFireEvent<eventname>;

if we write this piece of code ,where the control goes and what happens?

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

the Events are neccessary for example calling a method of a View from the Component Controller.

You can do that by creating an Event on the Controller, and creating an Event Handler

int the Method Tab of the view. In the Eventhandler you can select the Event that should

be listened to.

Now if you fire th event on the controller like this: wdThis.wdFireEvent<eventname>;

The according eventhandler will be executed in the view.

Hope this helps,

Regards,

Dennis

Former Member
0 Kudos

Hi Dennis,

Thanks for the info but i am not totally clear,still I have some doubts...,

If we created one event in any controller,How can we know that how many eventhandler methods in different views subscribed to this event?Is there any option for that?

And also what is the difference between onactionmethod and this fireeventmethod?

Former Member
0 Kudos

Hi Bharath,

right what Dennis said, besides there are some standard events types associated with each UI element type. An example is InputField has 'onEvent' event, DropDownList has 'onSelect' etc. etc.

Vito

Former Member
0 Kudos

The onAction Eventhandler only take care of Buttons or other UI Elements.

You can't know how many are suscribed as far as I think.

But normally it doesn't matter. the Eventhandler are only waiting for that Event if they are active.

But I also would say that it is the best to create for each action you want to map from the controller to the view, you should create an own event. It only make sense to have one event for more views if you know that they will not be displayed togehter and it will do similar things.

Events are also really helpful when you have more than one DC and what to trigger an action from the child component to the master component.

Answers (0)