cancel
Showing results for 
Search instead for 
Did you mean: 

Reset View to its initial state

former_member201227
Active Participant
0 Kudos

Hi experts,

In my Webdynpro componenet I am navigating between different views. I am displaying data in one view by entering the selection fields. And, when I come back to this view the selection and the data remains in the view. I want the view to be displayed in its initial state every time. Is there any method to reset the view, to be handled in WDDOEXIT?

Thanks,

Sharmila

Accepted Solutions (1)

Accepted Solutions (1)

former_member184578
Active Contributor
0 Kudos

Hi Sharmila.,

Use invalidate() method. Suppose u want to go back to first view.. in the OnActionBack., invalidate the node in first view., as.,

lo_nd_test->invalidate( ). then the fields in the first view gets reseted.

Reply if u need some more clarifications.,

Thanks & Regards

Kiran

former_member201227
Active Participant
0 Kudos

Hi Kiran,

Invalidate method is used to invalidate a node. But my view has so many nodes and some of the nodes are mapped with that

of the component controller. My requirement is to reset the complete view.

Thanks,

Sharmila

former_member184578
Active Contributor
0 Kudos

Hi Sharmila,

As I suggested use invalidate() method., else in the inbound handle method.., i mean if ur inbound plug for first view is tostart then in the HANDLETOSTART method manually clear the all fields by using set_attribute( ) method., as

set_attribute( exporting attribute_name = 'ATTR'

value = ' ' ).

former_member201227
Active Participant
0 Kudos

Hi Kiran,

Handling in the inbound plug method will solve my problem.

Thanks to all for your response. I'd given points to all.

Thanks,

Sharmila

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Sharmila ,

Change the lifetime of the view to when visible.

and it will not decrease your performance .

Refer to this wiki for the same :

[http://wiki.sdn.sap.com/wiki/display/Community/HighperformanceofWebdynpro+ABAP]

Regards

Kuldeep

Former Member
0 Kudos

Hi Sharmila ,

you can clear the values of the nodes by using INVALIDATE method of the context controller .

regards

Kuldeep

Former Member
0 Kudos

Hi Sharmila,

Go to VIEW->properties tab-> you will find LIFETIME , by default it is FRAMEWORK CONTROLLED,

Just change this to WHEN VISIBLE.

Your issue will solved.

Cheers,

Kris.

former_member201227
Active Participant
0 Kudos

Hi,

I don't want to set the View lifetime to When Visible as that will impact my performance?

Is there any other means to do it?

Thanks,

Sharmila