cancel
Showing results for 
Search instead for 
Did you mean: 

Steps to create an Event Handler and its associated Action (WebDynPro Java)

former_member187990
Participant
0 Kudos

Hi,

We are new to the WebDynPro-Java. We have a simple issue. We need to the creation of Event Handlers and Actions. Consider we have an Action for a Button say 'onActionClick'. This should call a method present in the component controller which will trigger the event handler. Plz also give a brief description about the Event Handler and the steps in creating the above query.

Thanks in advance

Regards,

Sathish Kumar SV

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

Events are used to communicate between controllers and enable one controller to trigger event handlers in a different controller.

To create evet in component controller

1. Open the Component Controller

2. Choose the Events tab page.

3. To create a new event, choose New.

4. Give the event the name and choose Finish to close.

To enable the View to trigger this event , the Component Controller must have a public method which triggers the event.

1. Choose the Methods tab page.

2. Create the method and choose Finish.

3. Choose the Implementation tab page.

4. To trigger the event, add the following program code to this created method

wdThis.wdFireEvent<name of the event>();

Now you can create envent handler in the view

1 Open the View

2. Switch to the Methods tab page.

3. Choose New.

4. In the wizard that appears, select Event handler and choose Next to confirm.

5. Enter the name and select Event source(component controller) and event that you have created as the Subscribed event. Choose Finish to confirm.

Note:When you create action its event handler is created automatically.

so you can specify Event source & Subscribed event for the event handler of the action.

You can go to this link for more information

http://help.sap.com/saphelp_nw2004s/helpdata/en/e0/14faee8ee4534989063a2588bc5754/frameset.htm

Regards

Gauri

eddy_declercq
Active Contributor
0 Kudos

Hi,

There is a specific WebDynpro Java forum () where you will muche better and quicker responses.

Eddy

-


PS. Reward the useful answers and you will get <a href="http:///people/baris.buyuktanir2/blog/2007/04/04/point-for-points-reward-yourself">one point</a> yourself!