Wednesday, December 18, 2013

Detail View Object Instance Programmatic Access

Usually it is quite obvious how to retrieve rowset from VO. It is still basic to retrieve rowset from detail VO, but there is something to keep in mind when accessing detail VO's - current row in master VO, current row must be set. Otherwise, there will be no detail rowset retrieved. I will demo and explain this case here.

Sample application is prepared as usual - MasterDetailAccessApp.zip. This application contains one Master VO and one Detail:


Here you can see example, where current row is not set for Master VO. In this case - there will be no rows returned for detail VO:


You would need to fix it, as for example by calling first() method. This will ensure first row is selected as current. As result - detail VO will be aware about current Master VO record and will be able to fetch proper value for bind variable to be included into SQL query:


Test from AM exposed interface:


Detail row is fetched and displayed:

No comments:

Post a Comment