cancel
Showing results for 
Search instead for 
Did you mean: 

view not getting refreshed / calling wdDoInit everytime when selecting view

chinmaya_sahoo
Contributor
0 Kudos

Hi All

I have requirement to call some function module every time when i click or select the view in portal.

so i have call those FM from wdDoInit method of the view.

I have only single view in the application.

but i am gettnig an impression that the view wdDoInit is not getting called at every time when i select the view.

i changed Lifecspan policy from "framework_controlled" (default) to "when_visible" in properties tab of View.

But it seems that the view is not getting destroyed when i navigate to other tab in portal and the view controler is alive so that its not calling wdDoInit method every time when i select the view.

Please let me know what i have missed or how to achive this ?

Thanks

Chinmaya

Accepted Solutions (0)

Answers (3)

Answers (3)

chinmaya_sahoo
Contributor
0 Kudos

Thanks All,

Some where in code i am using a session scope to store some var, that the reason being the view object is not getting destroyed even if i go out of the view.

former_member201361
Active Contributor
0 Kudos

hi Chinmaya,

i dont think u have missed anything, the doInit method in the view controller should be called when u have set the lifespan property to when Visible.

use message manager to print some message to check whether the doinit method is called or not?

Thanks and Regards

chinmaya_sahoo
Contributor
0 Kudos

Hi

Thanks for quick reply..

Prasad, i have no firePlug used over here in this application. using firePlug will destroy the view. but that is not my case.

So there are no invalidating concept comming here.

apart from the FM call in the wdDoInit i have some other thing need to be done over here.

fazal, i am tracking/debugging this by placing some message in the wdDoInit methos, but i am getting those messages only after the logging to poral and first time accessing the application.

My issue is after using lifeSpan property "When Visible" also the view dint destroy when i navigate to other tab.

(Navigation is not done through any firePlug, its simply selecting other tabs in portal)

Thanks

Chinmaya

former_member40425
Contributor
0 Kudos

Hi,

When visible property destroys view when you are nevigating between views but you are nevigating between tabs which is in your single view. it means you are on the same view every time.

I hope it clears.

Regards,

Rohit

chinmaya_sahoo
Contributor
0 Kudos

Yes Rohit , you are right, then is there any way to destroy the view when the user navigate to some other tab directly ?

i need to call the wdDoInit every time when ever the user goes to some other tab and come back to this application.

Thanks

Chinmaya

former_member40425
Contributor
0 Kudos

Hi Chinmaya,

Are you using tabstrip UI element in your view.???

chinmaya_sahoo
Contributor
0 Kudos

No Rohit, this is not a tab strip view.

This is a simple view containing some tables.

The issue being not destroyed the view while i am navigating to some other tab. Also i dont have any fire plug in this view.

thanks

Chinmaya

former_member201361
Active Contributor
0 Kudos

Hi,

The issue being not destroyed the view while i am navigating to some other tab. Also i dont have any fire plug in this view.

what do u mean by some other tab, is it switching to some other roles or workset in portal?

if ur application has two view, u are navigating from first View to second View and agian from second view to first View, Now the Do Init method of First View will be Called, if u have set the life Span property to When Visible.

Thanks and Regards

chinmaya_sahoo
Contributor
0 Kudos

Fazal

Some other tab means, it switching to some other roles or workset in portal by clicking on the top level navigation.

As informed before my application is having only a single view. But i need to call the wdDoInit every time when ever a user navigate to some other tab and come back to the view again by clicking on the tab for this application.

Thanks

Chinmaya

former_member201361
Active Contributor
0 Kudos

Hi,

Some other tab means, it switching to some other roles or workset in portal by clicking on the top level navigation.

if u are navigating to some other worksets or portal Roles and switching back to ur application, then the Do Init Method of ur View should be called. have u tried to print some messages in DoInit method, and check whether these messages are getting printed when ever u come back to this View.

Thanks and Regards

Fazal Ahamed

chinmaya_sahoo
Contributor
0 Kudos

Hi Fazal

Yes as mention above , i am debugging this by placing some message in the wdDoInit method of the view.

This messages i am getting only for the first time login to portal and accessing the application.

I am not able to get these mesages when i am navigating to some other node/tab and come back to the application view.

Chinmaya

former_member201361
Active Contributor
0 Kudos

Hi Chinmaya,

in ur case, u need not change the life Span property to "When Visisble" , coz when u select the application, application will be loaded again , the wdDoinit method will be called again.i have tested it , it is working correctly.

in my application, i am printing a message say "Test Message" in the doInit method using message manager. every time when i click the application, i am getting this message. i dont know why View is not getting refreshed ?

Thanks and Regards

chinmaya_sahoo
Contributor
0 Kudos

Hi Fazal

"u need not change the life Span property to "When Visisble""

right, bcoz in both the case i am experiencing similar effect.

AS desired the wdDoInit sholud called every time when the application get selected which is not happening in my case.

AS you told that u r getting the text message from wdDoInt of view, thats ture, but if you have any event to trigger in the view then do that so that it can clear the message, then navigate to some other view by selecting the tab and come back to the view again,

It should execute the wdDoint of the view and show the text message , but it will not show that,

You are getting that message bcoz that screen is having that message and wend younavigate some other and come back its showing the previous view not exeuting the wdDoInit again....

Thanks

Chinmaya

former_member40425
Contributor
0 Kudos

the problem which you are facinng ,Normally it does not happen. It may be created your webdynpro iView of type copy. If it is so then try with type delta link. Or if you are sending any parameter to application then sometimes it gives problem. Else whenever you nevigate between roles then You see the refreshed application(iViews) only.

Regards,

Rohit

chinmaya_sahoo
Contributor
0 Kudos

Hi Rohit

Nither the webdynpro iView is a Copy or deltaLink iView.

As per the webDynpro framework the wdDoInit method is getting called every time while accessing the application.

What if the view object is not get destroyed, if it is there then it wont call that method.

So i am expecting even after change in the view LifeSpan property to "while-visible", the view is not get destroyed when i navigate to some other tab.

thanks

Chinmaya

former_member40425
Contributor
0 Kudos

There will not be any problem even if lifeSpan property is when visible or framework controlled.

This is the problem towards portal side. try to make iView and page(if its there) for your webdynpro application again.

Former Member
0 Kudos

HI Kumar,

When your navgating to another tab your FM is not refreshing write?

You can invaliade the node in onfireplugfromtab.

Hopes it should work.

Regards,

Prasad