cancel
Showing results for 
Search instead for 
Did you mean: 

View Value Navigation

Former Member
0 Kudos

Hi ,

I have 4 views and have a following issue with it as below ...

View 2 - Have Date Field based up this Leave Calculation are based and will be displayed in View 3.

View 3 - Have Leave input box where the user can chage the leave hrs.

View4- Have Address details.

Each View have 'Back' & 'Continue' buttons . The when i am navigating view2 to view3 Leave Input box populates the correct value , even when i am back to View2 and change the date its popultes the correct value to View3.

The Problem is when i change the Leave Value in View3 and hit continue to View4 and then tried navigating back to the View3 the Leave Value in view3 changes to old value rather than the inputted value . Have written the code in 'handlein' event & WDINIT of view3 to calcualte and populate the Leave value on View3 . Any suggestion on this Please.

Thanks,

Kumar

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

As far as I understood your problem your code is getting executed everytime you come to view3 and it populates the calculated hours.

I doubt you are using single inbound plug in view 3. And both view2 and view4's outbound plug is connected to it. If this is the case make 2 inbound plugs in view 3. Lets say in_plug 1 and in_plug2. Connect in_plug1 with outbound(next) of view2 and in_plug2 with outbound(back) of view 4. Write your code for hour calculation in handle in of in_plug1. In that way when you will come back to view 3 from view 4 your handle in of in_plug2 will be called which has no code and so you will not face the problem of resetting your values. However whenever you will move from view2 to view3 automatic calculation will happen.

If this is not the case let me know there are other ways to handle this by maintaing some sort of flag. But I feel that is not required in your case and this should solve your problem.

Regards,

Neha

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

If you want to have the newly inserted values to be reflected in the UI elements when navigated from view to other then write the code in the respective Handlers of the plugs.

Try to use the global variables in the component controller context. if you write the code in the WDDOINIT, then only once it is triggered. Hence you can not see the updated values.

If you want to have new values then use the GET_ATTRIBUTE and SET_ATTRIBUTE of that context attribute.

Or else try to pass these parameters through the plugs to have the new values when navigated from back and forth from one view to other.

When navigated from view3 to view4 then write the code in the Input handler of view4 and write the code in the

handler when navigated from view4 to view3. WDDOINIT of view code gets triggered only once in the entire session.

Regards,

Lekha.