Skip to main content

Tips on defining Declarative View Objects

View Objects in 'Declarative SQL Mode' would help you to optimize SELECT clause at run time by having only those attributes/columns really used by the page(based on the attribute definitions from the page definition file ). This feature is useful if you have large number of attributes and only a subset is displayed on the UI. Please refer 5.8 Working with View Objects in Declarative SQL Mode in Fusion Developer's Guide to learn more about Declarative View Objects.

Please note that, each attribute in the view object has a Boolean property called "IsSelected". This is shown in the attribute editor as a check box - "Selected in Query".

If IsSelected=true (or absence of IsSelected attribute), then that attribute will be selected in the SELECT statement always, regardless of whether the attribute is selected by the UI or not. So if you really want to have optimized SELECT clause generated at run time (based on the attribute usage on UI), please deselect "Selected in Query" check box manually for all 'Non Key' attributes.


Arvind said…
If I use this view object from a webservice, like a create WS method, would adding isSelected="false" to an attrribute mean that the select query for this VO would not have these attributes?
Jobinesh said…
Can you explain the use case?
Praveer Das said…
Is there any way we can achieve this setting programatically in bean code ? An example would be helpful.

Popular posts from this blog

Happy New Year 2018 !

We can't go back and change the beginning, but we always can start where we are and change the ending. Believe in yourself and you will be unstoppable!

Wishing you and your family a very happy new year 2018 !!!

How to set Bind Variable Values at runtime ?

In this post I'm sharing a couple of approaches for programmatically setting bind variables values at run time. This post is an attempt to explain 'When to use what ?'[ In case if you are familiar with 'Bind Variables' in ADF BC, please refer Section 5.10, Working with Bind Variables in Fusion Developer's Guide ]

1. Set the Bind Variable value using RowSet::setNamedWhereClauseParam(...)

You can use use the setNamedWhereClauseParam(...) method on the ViewObject interface (which extends oracle.jbo.RowSet) to set the value for bind variables. Please note this sets the value on default RowSet. In other words, this doesn't have any effect on the secondary RowSets that you/system generates.
ViewObject vo = am.findViewObject("EmployeesView1"); vo.setNamedWhereClauseParam("bindVarDeptId", new Number(10)); vo.executeQuery();
2. Set the Bind Variable value using ViewObject's VariableValueManager::setVariableValue(...)

VariableValueManager Ma…