cancel
Showing results for 
Search instead for 
Did you mean: 

refresh component

Former Member
0 Kudos

we have three component (C1,C2,C3).

C2,C3 are used as used component in C1

c1 have view2 which display c2 and c3 component view in view container . c2 and c3 have horizontal context panal there is a button GO_BACK on C1 ( view2 ) which call search screen of C1.

my probem is i'm using horizontal context panel in component (C2,C3) if user select any tab from horizontal context view and press GO_BACK button (view2 of component ) it display search screen with search result  but if again came on view2 of c1 component by selecting different search result it display last used tab not deafult tab. calling default tab is in wddoinit method but C2 and c3 component used as used component so its not calling wddoinit again if we select different search result.

but when refersh application it came on view2 with default tab on horizontal context panel.  so i refresh application using exit plug but using exit plug i lose my search result.

i thought of creating a class to store its search result but if we use static variable user close browser  agian open browser he is going to get same search result which are used last time.

is there any way to refresh component C2 and C3. or call wddoexit hook method of C2 and C3.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Yadav,

Call all the default plugs from c1 component and set it default.

Regards,

Mahidhar.

Answers (1)

Answers (1)

former_member184578
Active Contributor
0 Kudos

Hi,

In Properties tab of View2 of C1 component change the lifetime property to When Visisble and try.

Or

In the HANDLE<Inbound_Plug> method of View2 write code to set the default tab using event handlers.

hope this helps u.,

Regards,

Kiran

Former Member
0 Kudos

lifetime option not working.

former_member184578
Active Contributor
0 Kudos

Hi,

In which INIT method you wrote the code to set default tab.? View of C2 component.!! then change the lifetime of view of C2 component to when Visible. So that INIT method will be called again when the view is called.

Regards,

Kiran

Former Member
0 Kudos

still not working it might be because c2 and c3 also have c1 as used component

former_member184578
Active Contributor
0 Kudos

Hi,

Then Create an interface method in C2 and write the code to set the default tab. In Handle<INput_Plug> method of View2 C1 call the interface method of C2.

Check this document for reference : http://scn.sap.com/docs/DOC-35144

Hope this helps u.,

Regards,

Kiran