FAQ #12 - How to disable query "wrapping" for expert mode queries in ADF 11g
http://jdeveloperfaq.blogspot.ca/2010/02/faq-12-how-to-disable-query-wrapping.html@Override
protected void create() {
super.create();
setNestedSelectForFullSql(false);
}
//Get ViewObjectImpl object
ViewObjectImpl vo = getDeptVO();
//Filter using specific attribute value
Row[] filteredRows = vo.getFilteredRows("AttributeName", "AttributeValue");
//Filter using RowQualifier Class
//Use RowQualifier if you have more than one condition in filtering rows
RowQualifier rowQualifier = new RowQualifier(vo);
rowQualifier.setWhereClause("AttributeName=AttributeValue");
filteredRows = vo.getFilteredRows(rowQualifier);
//Get ViewObjectImpl object
ViewObjectImpl vo = getAllAdvisorView();
//Get RowSetIteratorImpl object
RowSetIterator rsIterator=vo.createRowSetIterator(null);
//Filter using specific attribute value
Row[] filteredRowsRSI = rsIterator.getFilteredRows("AttributeName", "AttributeValue");
Do not use getRowSetIterator() as it impacts row currency on the front end so firstly you should use createRowSetIterator and you should call closeRowSetIterator on the iterator created through this because if you don't, framework will create new ViewRowSetIteratorImpl instances and keep on adding them.
If necessary, use finally blockDCBindingContainer bc = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
EmpVOImpl empVoImpl=(EmpVOImpl)bc.findIteratorBinding(
"EmpVO1Iterator"
).getViewObject();
RowSetIterator it = empVoImpl.createRowSetIterator(
null
);
while
(it.hasNext()){
EmpVORowImpl row=(EmpVORowImpl)it.next();
if
(row.getSal()!=
null
){
totalAmount=row.getSal().add(totalAmount);
}
}
it.closeRowSetIterator();
while
(it.hasNext()){
EmpVORowImpl row=(EmpVORowImpl)it.next();
if
(row.getSal()!=
null
){
totalAmount=row.getSal().add(totalAmount);
}
}
} catch(Exception e) {//handle here
} finally {
it.closeRowSetIterator();
}
<af:column filterable="true" headertext="#{bindings.View1.hints.DisplayDateTime.label}" id="c19" sortable="true" sortproperty="DisplayDateTime" width="150">
<f:facet name="filter">
<af:inputdate id="id6" value="#{vs.filterCriteria.DisplayDateTime}">
</af:inputdate></f:facet>
<af:outputtext id="ot33" value="#{row.DisplayDateTime}">
<af:convertdatetime datestyle="medium" locale="#{sessionScope.UserLocale}" pattern="#{bindings.View1.hints.DisplayDateTime.format}" timestyle="short" type="both"></af:convertdatetime></af:outputtext>
</af:column>
<af:selectOneRadio value="" id="sor1" required="true" autoSubmit="true" label="text"> <f:selectItems value=""" id="si2"/>
</af:selectOneRadio>