0 Replies Latest reply on Mar 25, 2013 11:16 AM by 490729

    ADF BAM-based data bound tree table does not get refreshed on change events

    490729
      Hi everyone,

      I'm having troubles using BAM with a tree table and I'm wondering if there's anyone who can help.

      Configuration:_
      - JDev 11.1.1.6.0
      - SOA Composite Editor Extension

      Application:_
      - Fusion Web Application (ADF)
      - contains a BAM Connection
      - BAM Data Control with Group Query type based on "/Samples/Employees" Data Object. Group Data By Salea Area and Salesperson. No Aggregates.
      - A simple jspx page that contains a tree table based on the previous BAM Data Control. The tree binding has ChangeEventPolicy set to push.
      The tree table definition is:
      <af:treeTable value="#{bindings._Sales_Area.treeModel}" var="node"
      selectionListener="#{bindings._Sales_Area.treeModel.makeCurrent}" rowSelection="single"
      id="tt1">
      <f:facet name="nodeStamp">
      <af:column id="c1">
      <af:outputText value="#{node}" id="ot2"/>
      </af:column>
      </f:facet>
      <f:facet name="pathStamp">
      <af:outputText value="#{node}" id="ot1"/>
      </f:facet>
      </af:treeTable>

      The page definition containing the tree binding is

      <?xml version="1.0" encoding="UTF-8" ?>
      <pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel" version="11.1.1.62.29" id="bamTreeTablePageDef"
      Package="view">
      <parameters/>
      <executables>
      <variableIterator id="variables"/>
      <iterator Binds="root" RangeSize="25" DataControl="EmployeesByArea" id="EmployeesByAreaIterator"/>
      <accessorIterator MasterBinding="EmployeesByAreaIterator" Binds="Query" RangeSize="25" DataControl="EmployeesByArea"
      BeanClass="oracle.model.EmployeesByArea.Query" id="QueryIterator"/>
      <accessorIterator MasterBinding="QueryIterator" Binds="_Sales_Area" RangeSize="25" DataControl="EmployeesByArea"
      BeanClass="oracle.model.EmployeesByArea._Sales_Area" id="_Sales_AreaIterator"
      ChangeEventRate="1000" RowCountThreshold="-1"/>
      </executables>
      <bindings>
      <tree IterBinding="_Sales_AreaIterator" id="_Sales_Area" ChangeEventPolicy="push">
      <nodeDefinition DefName="oracle.model.EmployeesByArea._Sales_Area" Name="_Sales_Area0">
      <AttrNames>
      <Item Value="value"/>
      </AttrNames>
      <Accessors>
      <Item Value="_Salesperson"/>
      </Accessors>
      </nodeDefinition>
      <nodeDefinition DefName="oracle.model.EmployeesByArea._Salesperson" Name="_Sales_Area1">
      <AttrNames>
      <Item Value="value"/>
      </AttrNames>
      </nodeDefinition>
      </tree>
      </bindings>
      </pageDefinition>


      ADS settings in adf-config.xml:
      <ads:adf-activedata-config xmlns="http://xmlns.oracle.com/adf/activedata/config">
      <transport>long-polling</transport>
      <latency-threshold>30000</latency-threshold>
      <keep-alive-interval>10000</keep-alive-interval>
      <max-reconnect-attempt-time>90000</max-reconnect-attempt-time>
      <reconnect-wait-time>5000</reconnect-wait-time>
      </ads:adf-activedata-config>


      Problem:_
      When running the jspx page, the tree correctly displays the hierarchy Sales Area -> Salesperson. However, when updating data in the Data Object e.g. insert/delete, the tree is not updated. The data in the tree is updated only when I reload the entire page.
      Note that I had no issues with a simple table created based on a Flat Query BAM Data Control on the same data object.
      The table gets updated, but the tree table doesn't.

      Looking at the [ADS documentation|http://docs.oracle.com/cd/E23943_01/web.1111/b31974/adv_ads.htm#CIHHAEIJ] , there seems to be some limitations when using a tree/tree table:

      "If you are using an ADF bound tree or tree table, you need to ensure the following:

      The binding represents homogeneous data (that is, only one rule), although an accessor can still access a like accessor.

      The binding rule contains a single attribute.

      The table does not use filtering.

      The tree component's nodeStamp facet contains a single outputText tag and contains no other tags"


      Regarding point #1 "The binding represents homogeneous data (that is, only one rule), although an accessor can still access a like accessor."
      I have tried with only one rule i.e. only for Sales Area, but the data still doesn't get updated.
      As a side note, I'd say that if the binding contains only one rule, then no hierarchy is displayed, it looks like a simple table. That's not the functionality I need, plus there's no point in using a tree table in this case.

      Regarding point #2 "The binding rule contains a single attribute"
      In the tree binding I display only one attribute (value), but there is also the 'id' attribute that is available, which is created by default in the BAM Data Control and I have no way of removing it from the data control. Could this be an issue?

      I'd say points #3 and #4 are covered. I have no filtering and I only display an outputText.

      Please advise on how to use a table tree with a BAM data control. I wasn't able to find any example of a tree table working with BAM/ADS.

      Thanks,
      Cristiana