cancel
Showing results for 
Search instead for 
Did you mean: 

parameter mapping for an action

gill367
Active Contributor
0 Kudos

can anybody help me with this parameter mapping.

how we can pass a parameter for an action.

and how to use that parameter in the implemented coding.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi sarbjeet,

Rajat has correctly explained your requirement.

Let me give you example.

say when the User opens your application it shows a page with one drop down which conatins some values and a button. So If you want to get the value selected by the user on click of the button, then you need to associate a action with the button(which you can define in action property of the button and it will automatically create the method and you can check it in the implementation tab). Now you can write the code for getting the value from drop down in this method. after getting the value you can do what ever logic you want to perform like inserting it into database etc.

Hope this will clearify logic. If you require the code then please let me know.

Regards

Narendra

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Sarabjeet,

When you create an action then in implementation also that method is created.

Now if you want to get some parameter value on this action then in the implementation part you can write the following code:

{wdContext.currentContextElement.get(attributename)();}

Now you can use this value in whatever way you want.

If you want to associate some action with some UI element then that is possible by setting the propert On Action in the property of that UI element and then associating it with the action.

Please explain what type of parameter you want to pass and if you have some doubts get back to me.

Regards.

Rajat

gill367
Active Contributor
0 Kudos

HI

I am taking abuot that parameter that we can use with an action. To get some value from the clientside to severside. like while using a dropdownbykey which key is selected we can pass this from clien side to serverside to use it