cancel
Showing results for 
Search instead for 
Did you mean: 

taking value of Inputfield while user writing

0 Kudos

Hi,

I try to take the value of an inputfield while user writing in. But, I can not take the value.

I used Context node and I see that node takes value after user finish writing and select any other element from form.

I try this code:

IWDInputField t = (IWDInputField) view.getElement("title");
String t1 = t.getValue();

but I can not take the value again.

can I do someting to take the value while user writing?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Altug,

Do you have value attribute in the context?

If you have then u can get the input field value like this.

wdContext.currentContextElement.getvalueattributenme();

put into string and where ever do u need u can utilize.

Thanks

Nageswara.

0 Kudos

Hi Nageswara,

I try it before:

String t1 = wdContext.currentContextElement().getTitle();

But it can not take the value while user writing.

Any other suggestion?

Former Member
0 Kudos

Hi Dagli,

If you have Title in the context.

Then u can use like this

String ra= wdContext.currentContextElement().getTilte();

if(ra!= null )

wdComponentAPI.getMessageManager().reportSuccess("hey ur input is "+ra );

else

wdComponentAPI.getMessageManager().reportSuccess("hey Enter input");

This is u can create button in Onsubmit only valid

try this.

Thanks

nageswara

0 Kudos

Thank you Nageswara,

I tried your suggestion before.

In my project, I want to use timetrigger to take inputfield value every 10 seconds.

So, when timetrigger starts to its action, user may still write the title. And I want to take the user value where it stayed.

But, inputfield not take the value while writing. It takes the value after changing focus.