cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hi,

i created a View with severel Input Fields. Normal Text Filds and Dropdown by Index Fields and some Date Fields.

Now i wanted to give the User the ability to clear his input.

I try to use Invalidate() but this kills my Dropdown Fields.

Is there a Function that resets my fields, without destroying my Dropdown Fields?

Regards

Tobias Kübler

0 Likes
View Entire Topic
Former Member
0 Likes

I Created the Method REFRESH in my View

whith this coding

method REFRESH .

wd_context->invalidate( ).

endmethod.

In my Method  ONACTIONCLEAR (my button)

i wrote

method ONACTIONCLEAR .

WD_COMP_CONTROLLER->REFRESH( ).

endmethod.

but i get this error

Web-Dynpro-Comp. / Intf. ZWD_ABSOLVENTEN_BETA,Web-Dynpro-View ANLEGEN

Methode ONACTIONCLEAR

Die Methode "REFRESH" ist unbekannt bzw. PROTECTED oder PRIVATE.

Now it tryed

WD_THIS->REFRESH().

and i didnt get any errors and the button worked but my DD-Lists are geding killed (empty) as before

Former Member
0 Likes

Yes. Correct.

You should have created the method REFRESH in Component controller. In this case you can use

WD_COMP_CONTROLLER->REFRESH() in VIEW.

Anyways, you have figured out a way to not get an error.

After WD_THIS->REFRESH().

Call the method that fills your drop down.

Former Member
0 Likes

And this may help you.

Consider an example.

You have a component controller, a view VIEW1 and a method METH1.

Case 1: If METH1 is in Component Controller.

- You can call this method from within the component controller using WD_THIS->METH1.

- you can also call this method from VIEW1 using WD_COMP_CONTROLLER->METH1.

Case 2: If METH1 is in VIEW1

- You can only call this method from VIEW1 using WD_THIS->METH1.

Former Member
0 Likes

My Method to fill the dropdown ist WDDOINIT

so i tryed

WD_COMP_CONTROLLER->WDDOINIT( ).

WD_CONTEXT->WDDOINIT( ).

WD_THIS->WDDOINIT( ).

but i get an error

Former Member
0 Likes

You cannot call WDDOINIT method. It is only called from run time.

Do one thing.

Remove the code that fills DD from WDDOINIT and create a new method say for example FILL_DD.

Now write the code here.

1. Call this method from WDDOINIT

2. Also call this method from ONACTIONCLEAR. ( Remember, do this only AFTER invalidate( ). )

amy_king
Active Contributor
0 Likes

Hi Tobias,

From what you wrote, you created the refresh method in your VIEW, but then you ask the COMPONENTCONTROLLER to execute it. If refresh is a method of your view, then your VIEW should call it. Otherwise create the method in your componentcontroller and then any view can call the method by asking the componentcontroller to execute it.

wd_comp_controller->refresh( ).

Cheers,