cancel
Showing results for 
Search instead for 
Did you mean: 

Supply function not triggering second time

former_member671224
Participant
0 Kudos

Hi,

In my application, I have 2 views; 1st view is for input and 2nd view will display output for the input given in 1st view;

When I give input and go to 2nd view, its giving correct result as output; but when I come back (BACK button in 2nd view to return to 1st view) and execute for other input value, its giving the old result (corresponding for 1st time input) as output;

I have written to code in supply function to fill context in 2nd view; since the supply function already triggered, its not triggering second time;

Can anyone please advice what is the right method to handle this?

Thanks

Amal

Accepted Solutions (1)

Accepted Solutions (1)

former_member184578
Active Contributor
0 Kudos

Hi,

Create a node in Component Controller and map it to both the views then both vies share the same data, no need to write extra methods again.

If you are displaying data in send view based of input in first view, You can do in OnAction to navigate to second view or HANDLE<Inbound>Plug of second view.

as the WDDOINIT method will call only for the first or as mentioned the supply function is calling only first time you can write your code in HANDLE<Inbound>PLUG of second view.

Hope this helps you.

Regards,

Kiran

former_member671224
Participant
0 Kudos

My second view has 3 level tree structure which gets updated based on parent level for each. Hence, I'm decide to go with supply function in view context;

And I'm trying to trigger the SF every time the view gets displayed, if there is any option by setting any flag or something.

Regards

Amal

former_member184578
Active Contributor
0 Kudos

Hi,

In your second view to fill the parent node you are writing the code in WDDOINT method i think. Thats why you are getting the same result.

To fill the parent node based on the value in first view, please write your code in HANDLE<Inbound_Plug>  method of second view instead of DOINIT method( as it will call only once). Then automatically the child node entries will get chaged as the parent node get new entries.

Or,

Go to Properties tab of your second view and change the life time to 'When visible' instead of Framework

Hope this helps u.,

Regards,

Kiran

former_member671224
Participant
0 Kudos

By changing the life time of the view to 'When Visible' it worked.

Thanks

Amal

Answers (0)