I'm using JDev 12.2.1 to create dynamic ViewObjects by custom queries in my application.
This works just fine and the row count of an executed query is also not zero.
Now my problem is to display the current dynamically created ViewObject rowset via dynamic table component. The column headers get rendered correctly, but it displays zero rows and just says "no data to display".
I found a trick on the web to remove the DefName attribute from the tree binding in the PageDef of my jsff page (from TaskFlow)... when I do this, the first time after executing the ViewObject it throws
a "JBO-25058 [adf][oracle.jbo.NoDefException]" or sometimes a PropertyNotFound exception, but after reloading the rows are displayed correctly.
The dummy ViewObject is created as query based with this simply clause "SELECT * FROM dual".
What can I do about this?
AppModule creating a new ViewObject:
public void createDynamicView(String query) {
ViewObject viewObjectOld = this.getDynamicView1();
viewObjectOld.remove();
this.createViewObjectFromQueryStmt("DynamicView1", query);
ViewObject viewObject = this.getDynamicView1();
viewObject.executeQuery();
}
The dynamic table component:
<af:table value="#{bindings.DynamicView1.collectionModel}" var="row"
rows="#{bindings.DynamicView1.rangeSize}"
emptyText="#{bindings.DynamicView1.viewable ? 'No data to display.' : 'Access Denied.'}"
rowBandingInterval="0" selectedRowKeys="#{bindings.DynamicView1.collectionModel.selectedRow}"
selectionListener="#{bindings.DynamicView1.collectionModel.makeCurrent}"
rowSelection="single" fetchSize="#{bindings.DynamicView1.rangeSize}" id="t1" partialTriggers="b1">
<af:iterator id="i1" value="#{bindings.DynamicView1.attributesModel.attributes}" var="column"
rows="0">
<af:column headerText="#{column.label}" id="c1">
<af:dynamicComponent id="d1" attributeModel="#{column}" value="#{row.bindings[column.name].inputValue}"
readOnly="true"/>
</af:column>
</af:iterator>
</af:table>
The page PageDef tree binding:
<tree IterBinding="DynamicView1Iterator" id="DynamicView1" >
<nodeDefinition /* DefName="model.vo.DynamicView10" */ Name="DynamicView10">
<AttrNames>
<Item Value="Dummy"/>
</AttrNames>
</nodeDefinition>
</tree>