cancel
Showing results for 
Search instead for 
Did you mean: 

cleaning input field from one view in a viewset

Former Member
0 Kudos

Hi Friends,

I am using layout 270. it has three views, so on left half screen, 2 views.

when I click on one button on first view, which has input fields, search results are displayed.

when user clicks back to search button, I should be able to clear al the input field values provided, hwo to do it?

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member182372
Active Contributor
0 Kudos

Set context attributes which are bound to value property of InputField to null in action habdler after search.

Former Member
0 Kudos

Nav,

You can use WebDynpro client side event handlers. When User clicks on search button, generate an event, register and handle this event on the view where you want to clear the input fields.

Former Member
0 Kudos

Hi Sridhar,

Thanks a lot.

can you please send me some example how to use cleint side event ?

or, any related example where input fields are cleared using client side event?

another point:-

I actually want to get the inputfield values at runtime, but I get the values which were entered previously.

so when I click on search again after changing values, I shoudl get latest values.

former_member182372
Active Contributor
0 Kudos

There is NO "WebDynpro client side event handlers"! Custom action handlers in WD are all serveisde.

Former Member
0 Kudos

Hi ,

when I click on search with no input, I get proeper eror message, provide at least one input field entry.

when I provide entry, I get data as search result.

when I again remove all input field values and press search I dont get same error message that provide input values.. I should get the message.

why again exception is not raised? or is it internally taking some values?

Former Member
0 Kudos

Friends,

please provide answer!

Former Member
0 Kudos

Nav,

Checkout this tutorials: https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e8d7cd90-0201-0010-4a8c-dd2...

It has step by step instructions for event handling in WebDynpro.

Former Member
0 Kudos

Hi,

to clear the input fields use this

wdContext.current<name>Element().set<Param>(null);

Kind Regards

Mukesh