cancel
Showing results for 
Search instead for 
Did you mean: 

clear field

Former Member
0 Kudos

Hi all,

I am working on a web dynpro application.

The application has several input fields for the user to enter data. It also has 2 buttons submit and clear.

Upon clicking the clear button the fields should clear- Can anyone please provide me the code for clearing the fields. thanks

Accepted Solutions (1)

Accepted Solutions (1)

former_member182374
Active Contributor
0 Kudos

Hi,

Say your input field is bound to a context element input1 then just write:

wdContext.currentContextElement().setInput1("");

Regards,

Omri

Answers (2)

Answers (2)

sureshmandalapu6
Active Contributor
0 Kudos

Hi SM,

The simple way is this

wdContext.currentContextElement().setInput1("");

If your question is answered. please close the thread.

Thanks

Suresh

former_member197348
Active Contributor
0 Kudos

Hi SM,

How is your context?

If all your context attributes bound to input fields are directly under Root node.

You have to clear one by one explicitly as Omri told.

wdContext.currentContextElement().set<attribname>("");

If your context attributes are in value nodes then you can clear the entire node once.

wdContext.node<name>().invalidate();

But if your context attributes are in model nodes then you can clear the entire node once.

wdContext.node<name>().bind(new modelclass());

Regards,

Siva