cancel
Showing results for 
Search instead for 
Did you mean: 

How to Fire event in Web Dynpro?

former_member182374
Active Contributor
0 Kudos

Hi All,

I'm a Web Dynpro newbie.

I have a view with a button, two input fields and a drop down.

Pushing the button populates the drop down with values according to the two input fields.

The two input fields have default values and I want to "simulate" a button pushed action (call the method) when the view initializes (on the view's "wddoinit").

how do I that? (The "OnActionBtn" needs event parameter so I can't call it)

thanks,

Omri

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Omri,

Make one method that includes all your coding to populate Dropdown box. Then, call this method from Wdinit method as well as OnActionBtn method.

regards,

Bhavik

former_member182374
Active Contributor
0 Kudos

Thanks, I thought that there is a way to "Fire" the OnAction but it worked too, So problem is solved.

Answers (3)

Answers (3)

Former Member
0 Kudos

Omri,

Do you actually use this parameter? I bet the answer is "no". So why not to simply do:

public wdDoInit()
{
  OnActionBtn(null); /*Or whatever name for action handler*/
}

VS

Former Member
0 Kudos

hi,

You can create a method from the methods tab in your view controller. Write the code for populating your combo box in this method. Now in the doInit you can call this method. In the action handler of the button also call this method.

hope this helps you.

regards,

Rahul.

Former Member
0 Kudos

hi Omri,

Go to methods tab and create a new method say populateValues .Go to implementation tab and go to this method. Write the code for entering values here.Go to doinit and just call that method there.

NB:Dont forget to <b>clear the value set</b> when you push the button again.It can be done by

valset.clear();

where valset is your valueset

Hope this helps you.Do give points if it helps you

Regards,

Rohit.