This discussion is archived
2 Replies Latest reply: Jun 21, 2012 1:07 AM by Sudipto Desmukh RSS

Table in nested Iterators-Tree Level Rules for ViewInstances using same VL

Sudipto Desmukh Expert
Currently Being Moderated
Hi All ,
Jdev 11.1.1.6 , ADF BC , WLS 10.3.5.

I have a use case wherein I need to show a table nested at 3rd level within 2 af:iterators like -
 <af:iterator id="i1" value="#{bindings.Location.collectionModel}"
               var="locRow" varStatus="varStatus">
<af:iterator id="i2" var="deptRow" value="#{locRow.children}"
varStatus="varStat">
<af:table value="#{deptRow.Employees}" //using child View Link accessor Attribute directly can use deptrow.children too
                      var="row">
<af:column>
<af:inputText value="#{row.EmployeeName}">
</af:column>
</af:table>
</af:iterator>
</af:iterator>
I need to display a table of Employees for each manager ... like ManagerId=100 in one table and others in a separate one (I know weird requirement but thats how it is :( )
So basically in my AM Data Model I have shuttled two view instances of Employee and filtered them using ViewCriterias accordingly like ->

OrgAM
-Location
Department
---Employees //(WithManager100)
---EmployeesWithManageNot100

Now since there is just one ViewLink between Department & Employees .. I am able to add "*EmployeesWithManageNot100*" as a child ViewLink accessor attribute , only Employees is available.

Is there any way we can show separate child ViewInstances in a treeModel with only one ViewLink ?
  • 1. Re: Table in nested Iterators-Tree Level Rules for ViewInstances using same VL
    Frank Nimphius Employee ACE
    Currently Being Moderated
    Hi,

    important: 11.1.1.6 , ADF BC , WLS 10.3.5. is not correct - it should be WLS 10.3.6

    For the tree building, its not the view links you defined on the ADF BC data model but the view links physically defined for the View Objects. Only the top level node view object is really read from the data model, the rest then is looked up by implicit accessors created. So while there is a way to have two child node collections, its not from view object instances you define and configure using view criteria

    See https://blogs.oracle.com/smuenchadf/resource/examples#113

    though this sample is on JDeveloper 10.1.3, it still works in 11g. What it shows is how to filter child rows in a tree based on some criteria

    Frank
  • 2. Re: Table in nested Iterators-Tree Level Rules for ViewInstances using same VL
    Sudipto Desmukh Expert
    Currently Being Moderated
    Thanks for your reply Frank.
    important: 11.1.1.6 , ADF BC , WLS 10.3.5. is not correct - it should be WLS 10.3.6
    AFAIK , 11.1.1.6 is compatible with both WLS 10.3.5 and 10.3.6 WLS and comes out of the box with WLS 10.3..5 which I am using for the Integrated Server.
    So while there is a way to have two child node collections, its not from view object instances you define and configure using view criteria
    The link you posted above is simialr to another link I bumped into yesterday -
    "How to filter tree node child data" , Pg 12 @ http://www.oracle.com/technetwork/developer-tools/adf/learnmore/feb2011-otn-harvest-328207.pdf written by you.

    But my requirement is showing instances of the same EmployeeVO as two tables inside the Department Iterator. But I am not able to do that since there is only one ViewLink accessor for the EmployeeView.
    Is that even possible without using 2 explicit physical View Links ?

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points