cancel
Showing results for 
Search instead for 
Did you mean: 

Get input field data

Former Member
0 Kudos

Hi Experts,

Can anyone suggest me the steps to get the data entered by the user in input field?

Regards,

Murali Krishnan N

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

You need to create a context value Attribute.

If you want the input value to be accessible in many views, then follow the steps to create a value attribute in Component Controller.

1. Go to your Component Controller and Properties-->Context.

2. Right click on root(Context) ->New->Attribute (say EmployeeID).

3. Now in the graphical section, which shows your controller and view, search for Data Link (on right hand side I believe) and drag from your View to component controller.

4. In the next popUp, select the EmployeeID attribute from Component side (right hand side) and drop

it on the context node of view(lhs).

5. Click Finish. And you are done.

This is called Context mapping. You can access the value of EmployeeID in any view controller using the following Code--

String sEmployeeID = wdContext.currentContextElement().getEmployeeID();

kg2020
Explorer
0 Kudos

You create a context value attribute, lets say myInput (default type is string).

You bind that context element to the inputfield from the input field property.

Next you can retrieve the value the user enters in the inpurfield at runtime with the following code:

wdContext.currentContextElement().getmyInput();

Former Member
0 Kudos

Hi Murali,

Can you please be specific about your issue?

Thanks

Santosh