cancel
Showing results for 
Search instead for 
Did you mean: 

Difference between action and event

Former Member
0 Kudos

Hi

while creating an action, we will find action & event handler. What is the difference between Action and event. If anyone provide with examples, it will be helpful for me.

regards,

vijaya.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi vijaya,

As far as i know,Both action and eventhandler are inter related.For every action an event handler will be generated.

For example Submit button is an action."On click of submit button" menas generating an event to execute that action .

So for every action created by the developer an event handler will be generated

Regards

Padma N

Answers (3)

Answers (3)

Former Member
0 Kudos

thanks all now my doubt is cleared

Former Member
0 Kudos

hi vijaya,

Suppose lets take

In a layout we designed an UI element like button,

In the actions tab we created action like "save" then it will automatically generated "event handler" like onActionsave. in the properties of button we will assign action "save" to the events. then only particular action will be performed if an event will be triggered.

for example take if i click button the controller will navigate to the second view. in this case we will write some code (that means we are performing some action right)

the code will be called when ever an event will be performed(like clicking the button). here clicking the button is event and what ever the process that will do after clicking the button is action. (that is action performed by particular button etc are nothing but an event)

snehal_kendre
Active Contributor
0 Kudos

HI,

In simple words we can put it as..IF you need any user interaction.. i.e. if your logic is based upon how user interact with your application then use Action..

e.g. Buttons, dropdown UI elements...etc..

Means actions are act between user and your application.

But your application not only communicate with user.But also communicate with server too.

so to communicate with server you need and Event

Note. In Web Dynpro, events are called actions if they are sent from the client to the server.