This content has been marked as final. Show 7 replies
I have not tried this, but you can try to post your changes after you insert data on your second VO and refresh the first VO page by setting proper query mode
//After VO2 insert
//Set query mode for your VO1
vo1.setQueryMode(ViewObject.QUERY_MODE_SCAN_DATABASE_TABLES | ViewObject.QUERY_MODE_SCAN_ENTITY_ROWS | ViewObject.QUERY_MODE_SCAN_VIEW_ROWS);
But you might want not test how your screen saves the state during actv/passv.
Good luck !
Thanks for the response.
I will definitely try and let you know the result.
I got the same solution when I googgled the usecase.
But when I discussed the same solution with my superiors, they say that this piece of code will raise some performance issues.
Looks to me like there is no work around for this. Let me know if there is any another solution.
I hope that you didn't understand my requirement.
The solution you have given would surely work out If I am having only one VO in the model layer.
But I have two different VO's which are based on a single EO.
One VO, say VO1 is used for displaying the data in the UI as a table.
VO2 is used to update the table in the java code.
So, when VO2 updates the data, VO1 should be getting the changes done by VO2.
In this case having a partial trigger on the UI table using VO1 is not working out.
The first VO which I mentioned is based on two EOs and has a lot of calculated values.
And to add to my worries there is a parent child relationship between the two EO's, where in parent is updated with one row and child with multiple rows.
The multiple rows updation to the child should happen with a shuttle component in a different popup.
So I am inserting everything programatically in the java code, where I need two use different VO to update parent and different VOs for the shuttle.
I could get the data, if it is committed, but to add to the complexity, there is a global save button which should commit the data.
So I want to get the data based on the EO update before commit to the database.
I Have tried the code below.
But with the line "vo1.setQueryMode(ViewObject.QUERY_MODE_SCAN_DATABASE_TABLES | ViewObject.QUERY_MODE_SCAN_ENTITY_ROWS | ViewObject.QUERY_MODE_SCAN_VIEW_ROWS);",
the query is returning many duplicate values.
This is working fine.