Tree table

How to get a value of the clicked node from a adf tree component in a text box ?
pls reply.

http://oracle.com/technology/products/jdev/tips/fnimphius/getTreeTableSelection/getTreeTableSelection.html

Similar Messages

  • Cannot sort child rows in multilevel tree table

    Hi,
    I originally hijacked a two-year-old forum thread that was vaguely similar to my issue, but a kind forum moderator split my post away
    (and deleted my other hijack post asking this same question)
    so that my inquiry might be viewable on its own.
    Hopefully someone can pay attention to my issue instead of getting it confused with those other old forum threads.
    So, here we go ...
    Is sorting in a treeTable at a particular level possible? Just want to let you I have tried the following approaches to do this. But it dis not work for me.
    I have tree table with 2 levels. I am trying to sort the child rows based on its column say "Display Sequence".
    User can type in number in this column which contains input text. On value change event of the this field, all the
    child rows in the level 2 need to be sorted. This needs to be done without committing the data. On commit it works,
    because it sorts based on order by clause. I want the child rows to be sorted on value change event. Following
    various approaches I tried.
    TreeModel tModel = (TreeModel)treeTable.getValue();
    SortCriterion sortCriterion = new SortCriterion("DisplaySequence",true);
    List<SortCriterion> sortCriteriaList = new ArrayList<SortCriterion>();
    sortCriteriaList.add(sortCriterion);
    tModel.setSortCriteria(sortCriteriaList);
    The above code does not work, As "DisplaySequence" is not available in the parent view object.
    Here is approach no 2
    JUCtrlHierBinding treeTableBinding = null;
    JUCtrlHierNodeBinding nodeBinding = null;
    JUCtrlHierNodeBinding parentNodeBinding = null;
    JUCtrlHierTypeBinding nodeHierTypeBinding = null;
    Key rowKey;
    Object dispSeqObj;
    Number displaySequence = null;
    Map<Key,Number> keyValueMap = null;
    Set<Key> emptyValueKeySet = null;
    Map<Key,Number> sortedKeyValueMap = null;
    DCIteratorBinding target = null;
    Iterator iter = null;
    int rowIndex = 1;
    RowSetIterator rsi = null;
    Row currentRow = null;
    Row row = null;
    RowKeySet selectedRowKey = lookupTreeTable.getSelectedRowKeys();
    Iterator rksIterator = selectedRowKey.iterator();
    if (rksIterator.hasNext()) {
    List key = (List)rksIterator.next();
    System.out.println("key :"+key);
    treeTableBinding = (JUCtrlHierBinding) ((CollectionModel)lookupTreeTable.getValue()).getWrappedData();
    nodeBinding = treeTableBinding.findNodeByKeyPath(key);
    parentNodeBinding = nodeBinding.getParent();
    //rsi = nodeBinding.getParentRowSetIterator();
    rsi = parentNodeBinding.getChildIteratorBinding().getRowSetIterator();
    keyValueMap = new LinkedHashMap<Key,Number>();
    emptyValueKeySet = new LinkedHashSet<Key>();
    // Gets the DisplaySequence by iterating through the child rows
    while(rsi.hasNext()) {
    if(rowIndex==1)
    row = rsi.first();
    else
    row = rsi.next();
    rowKey = row.getKey();
    dispSeqObj = row.getAttribute("DisplaySequence");
    if(dispSeqObj!=null && dispSeqObj instanceof Number) {
    displaySequence = (Number)dispSeqObj;
    keyValueMap.put(rowKey, displaySequence);
    }else {
    emptyValueKeySet.add(rowKey);
    rowIndex++;
    rowIndex = 0;
    // Sort the numbers using comparator
    DisplaySequenceComparator dispSeqComparator = new DisplaySequenceComparator(keyValueMap);
    sortedKeyValueMap = new TreeMap<Key,Number>(dispSeqComparator);
    sortedKeyValueMap.putAll(keyValueMap);
    rsi.reset();
    nodeHierTypeBinding = nodeBinding.getHierTypeBinding();
    System.out.println("nodeHierTypeBinding :"+nodeHierTypeBinding);
    String expr = nodeHierTypeBinding.getTargetIterator();
    if (expr != null) {
    Object val = nodeBinding.getBindingContainer().evaluateParameter(expr, false);
    if (val instanceof DCIteratorBinding) {
    target = ((DCIteratorBinding)val);
    ViewObject targetVo = target.getViewObject();
    System.out.println("targetVo :"+targetVo);
    targetVo.setAssociationConsistent(true);
    //ri = target.findRowsByKeyValues(new Key[]{rowData.getRowKey()});
    rsi = parentNodeBinding.getChildIteratorBinding().getRowSetIterator();
    //rsi = nodeBinding.getParentRowSetIterator();
    // Rearrange the tree rows by inserting at respective index based on sorting.
    ViewObject vo = nodeBinding.getViewObject();
    iter = sortedKeyValueMap.keySet().iterator();
    while(iter.hasNext()) {
    currentRow = rsi.getRow((Key)iter.next());
    rsi.setCurrentRow(currentRow);
    rsi.setCurrentRowAtRangeIndex(rowIndex);
    //rsi.insertRowAtRangeIndex(rowIndex, currentRow);
    rowIndex++;
    iter = emptyValueKeySet.iterator();
    while(iter.hasNext()) {
    currentRow = rsi.getRow((Key)iter.next());
    rsi.setCurrentRow(currentRow);
    rsi.setCurrentRowAtRangeIndex(rowIndex);
    //rsi.insertRowAtRangeIndex(rowIndex, currentRow);
    rowIndex++;
    rsi.closeRowSetIterator();
    AdfFacesContext.getCurrentInstance().addPartialTarget(treeTable);
    private class DisplaySequenceComparator implements Comparator {
    Map<Key,oracle.jbo.domain.Number> dispSeqMap = null;
    public DisplaySequenceComparator(Map<Key,oracle.jbo.domain.Number> dispSeqMap) {
    this.dispSeqMap = dispSeqMap;
    public int compare(Object a, Object b) {
    Key key1 = (Key)a;
    Key key2 = (Key)b;
    oracle.jbo.domain.Number value1 = dispSeqMap.get(key1);
    oracle.jbo.domain.Number value2 = dispSeqMap.get(key2);
    if(value1.getValue() > value2.getValue()) {
    return 1;
    } else if(value1.getValue() == value2.getValue()) {
    return 0;
    } else {
    return -1;
    In the above code I tried to perform sorting of DisplaySequence values using comparator, then tried to rearrange
    nodes or rows based on sort resurts. But rsi.insertRowAtRangeIndex(rowIndex, currentRow) give
    DeadViewException...unable to find view reference. While setting current row also does not work.
    Approach 3.
    DCIteratorBinding iter1 =
    bindings.findIteratorBinding("childIterator");
    iter1.executeQuery();
    SortCriteria sc = new SortCriteriaImpl("DisplaySequence",false);
    SortCriteria [] scArray = new SortCriteria[1];
    scArray[0] = sc;
    iter1.applySortCriteria(scArray);
    Any help in Sorting Child nodes ADF treeTable is appreciated. Thanks in Advance.
    Abhishek

    Hi Frank,
    Thanks for your reply. I have tried similar approach for sorting tree table child rows based on user specified number and it works. But there is a limitation for this. This sorting works only for read only/transient view object. For updatable view object after sorting, data cannot be saved or updated, as it cannot find the rowid. Here is what I tried
    In the ParentViewImpl class,
    1. overrode the method createViewLinkAccessorRS, so that this method is forcefully executed.
    @Override
    protected ViewRowSetImpl createViewLinkAccessorRS(AssociationDefImpl associationDefImpl,
    oracle.jbo.server.ViewObjectImpl viewObjectImpl,
    Row row,
    Object[] object) {
    ViewRowSetImpl viewRowSetImpl = super.createViewLinkAccessorRS(associationDefImpl, viewObjectImpl, row, object);
    return viewRowSetImpl;
    2. Added the following method, which will be invoked on valueChange of DisplaySequence in child row. Expose this method through client interface. This method accept a parameter i.e. parent row key of the child row.
    public void sortChildRecords(Key parentKey) {
    ViewObject viewObject = null;
    String type = null;
    if(parentKey==null) {
    Row [] row = this.findByKey(parentKey, 1);
    RowSet rowSet = (RowSet)row[0].getAttribute("ChildVO");
    viewObject = rowSet.getViewObject();
    viewObject.setSortBy("DisplaySequence asc");
    }else {
    Row row = getCurrentRow();
    RowSet rowSet = (RowSet)row.getAttribute("ChildVO");
    viewObject = rowSet.getViewObject();
    viewObject.setSortBy("DisplaySequence asc");
    this.setQueryMode(ViewObject.QUERY_MODE_SCAN_DATABASE_TABLES |
    ViewObject.QUERY_MODE_SCAN_ENTITY_ROWS);
    this.executeQuery();
    For custom sort, lets say all the numbers should be display first in ascending order, and null or empty values to be display at the end need to override the getRowComparator method in the ChildViewImpl class,
    Here is the code for the same
    @Override
    public Comparator getRowComparator() {
    SortCriteria sortCriteria = new SortCriteriaImpl("DisplaySequence",false);
    SortCriteria [] sortCriterias = new SortCriteria[1];
    sortCriterias[0] = sortCriteria;
    return new DisplaySequenceComparator(sortCriterias);
    private class DisplaySequenceComparator extends RowComparator {
    public DisplaySequenceComparator(SortCriteria [] sortCriterias) {
    super(sortCriterias);
    public int compareRows(Row row1, Row row2) {
    Object dispSeqObj1;
    Object dispSeqObj2;
    Number dispSeq1 = null;
    Number dispSeq2 = null;
    boolean compareRow1 = true;
    boolean compareRow2 = true;
    if(row1!=null) {
    dispSeqObj1 = row1.getAttribute("DisplaySequence");
    if(dispSeqObj1!=null && dispSeqObj1 instanceof Number) {
    dispSeq1 = (Number)dispSeqObj1;
    }else {
    compareRow1 = false;
    if(row2!=null) {
    dispSeqObj2 = row2.getAttribute("DisplaySequence");
    if(dispSeqObj2!=null && dispSeqObj2 instanceof Number) {
    dispSeq2 = (Number)dispSeqObj2;
    }else {
    compareRow2 = false;
    if(compareRow1 && compareRow2) {
    if(dispSeq1.getValue() > dispSeq2.getValue()) {
    return 1;
    } else if(dispSeq1.getValue() == dispSeq2.getValue()) {
    return 0;
    } else {
    return -1;
    if(!compareRow1 && compareRow2)
    return 1;
    if(compareRow1 && !compareRow2)
    return -1;
    return 0;
    The above solution works properly, and sorts the child tree rows. But while saving the changes, update fails. I also came to know that in-memory sorting is applicable to read-only/transient view objects from some blogs and also mentiond in this link http://docs.oracle.com/cd/E24382_01/web.1112/e16182/bcadvvo.htm
    Is there any way that updatable view objects can be sorted and saved as well?
    Thanks,
    Abhishek
    Edited by: 930857 on May 2, 2012 7:12 AM

  • In a popup the tree table data is not getting displayed properly

    Hi,
    I have a taskflow which contains a tree table within a panelStetchLayout. Following is the taskflow code :
    <af:panelStretchLayout id="SecurityAdminManageRoles" bottomHeight="0" topHeight="auto" inlineStyle="width:725px;height:400px;">
    <f:facet name="center">
    <af:treeTable value="#{bindings.WebCenterSecurityDCPermission.treeModel}" var="node" expandAllEnabled="true" fetchSize="150" verticalGridVisible="false" horizontalGridVisible="true" columnSelection="none" rowBandingInterval="0" columnStretching="last" contentDelivery="immediate" summary="#{uib_o_w_w_r_WebCenter.SECURITY_PERMISSIONS}" disclosedRowKeys="#{webcenterAdminSecurityBean.disclosedRowKeySet}" inlineStyle="border:none" binding="#{webcenterAdminSecurityBean.rolesTable}" id="tt2" styleClass="AFStretchWidth" autoHeightRows="150">
    <f:facet name="nodeStamp">
    <af:column width="260"
    selected="false" noWrap="false" id="c3">
    <f:facet name="header">
    <af:outputText value="#{uib_o_w_w_r_WebCenter.LABEL_PERMISSIONS}"
    id="ot5"/>
    </f:facet>
    <af:panelGroupLayout id="pgl26">
    <af:forEach items="#{bindings.getRoleHeaders.result}" var="role">
    <af:outputText value="#{role.value}" visible="false" id="ot1"/>
    <af:selectBooleanCheckbox selected="#{node.dataProvider.serviceActions[role.value]}"
    rendered="#{!node.dataProvider.serviceHeader}"
    label="#{null}"
    disabled="#{(node.dataProvider.readOnly and role.seededRole) or node.dataProvider.actionDisabledMap[role.value] == true}"
    simple="true" id="sbc2">
    <f:attribute name="permission" value="#{node}"/>
    </af:selectBooleanCheckbox>
    </af:forEach>
    <af:spacer width="5" id="s2"/>
    <af:outputText value="#{node.name}" noWrap="false" id="ot2"
    inlineStyle="#{node.dataProvider.serviceHeader? 'font-weight:bolder;': ''}"/>
    </af:panelGroupLayout>
    </af:column>
    </f:facet>
    <af:column headerText="#{uib_o_w_w_r_WebCenter.LABEL_DESCRIPTION}" rowHeader="unstyled" noWrap="false" id="c1">
    <af:outputText value="#{node.description}" noWrap="false"
    inlineStyle="color:grey;" id="ot3"/>
    </af:column>
    </af:treeTable>
    </f:facet>
    </af:panelStretchLayout>
    </jsp:root>
    This taskflow is included as a region within another page :
    <af:commandToolbarButton id="cb3"
    shortDesc="#{uib_o_w_w_r_WebCenter.LABEL_EDIT_PERMISSION_HINT}"
    icon="/adf/webcenter/edit_sm_ena.png"
    text="#{uib_o_w_w_r_WebCenter.LABEL_EDIT_PERMISSION}"
    inlineStyle="align:left">
    <af:showPopupBehavior popupId="managePopup"/>
    </af:commandToolbarButton>
    <af:popup id="managePopup" contentDelivery="lazyUncached">
    <af:dialog modal="true" type="cancel"
    title="#{requestContext.formatter[uib_o_w_s_r_Spaces.EDIT_ROLE][pageFlowScope.o_w_wa_spacesRoleBacker1.selectedRole.value == webcenterAdminSecurityBean.spacesUsersRole ? uib_o_w_s_r_Spaces.LABEL_AUTH_USER : pageFlowScope.o_w_wa_spacesRoleBacker1.selectedRole.value]}"
    titleIconSource="/adf/webcenter/empty.png" id="d4">
    <af:region value="#{bindings.editroletaskflow.regionModel}"
    id="r2"/>
    <f:facet name="buttonBar">
    <af:commandButton partialSubmit="true"
    text="#{uib_o_w_w_r_WebCenter.LABEL_SAVE}"
    actionListener="#{o_w_w_i_v_b_webCenterViewUtilsBean.saveChangesAndCloseWCLinksPopup}"
    id="cb4">
    <f:attribute value="#{bindings.editroletaskflow.regionModel}"
    name="wcRegionModel"/>
    <f:attribute value="bindings.saveRoles.execute"
    name="wcMethodToExecute"/>
    </af:commandButton>
    </f:facet>
    </af:dialog>
    </af:popup>
    In the main page, there is a table, I select one row and then click on this commandButton, which launches the popup.
    The problem here is that when I launch the popup, there are many rows in the table and hence a scroll bar appears. Scroll down the popup and close the popup.
    Again I launch the popup, I see that the popup displays in the same state as it was closed before, i.e the scrollbar is at the bottom and the first row is not displayed.

    ...also do not forget to:
    1. adjust the Active property for the task flow binding (in the pageDef).
    Set property value to the true on popupFetchListener, and to the false when closing popup
    2. for the af:popup containing region, set childCreation to deffered

  • Tree Table is not getting refreshed properly in Jdev 11.1.2.0

    Hi,
    I am seeing a peculiar issue with tree table not getting refreshed in Jdev 11.1.2.0.
    Let me explain you my use case.
    I have a tree table in a page, where the first column is displayed as selectBooleanRadio component. When user selects this selectBooleanRadio component, that treetable node should get expanded and at the same time all the child records(I have a select boolean check box component(transient attribute) at the child level) for that node should get selected. This is to allow user to unselect the child records, which he/she does not want to process further(some functionality).
    Now when the user selects any radio button, the tree table node is not expanded, but the arrow beside the radio button for that node can be seen as expanded.
    I thought it may be a partial trigger issue, so i tried refreshing the tree table programatically as well. But it was of no use.
    Then I set the partial triggers wrt to SelectBooleanRadio component on the parent container of the TreeTable. After which somehow the node got expanded but the tree table shrinks in width and the actual disclosure functionality of a tree table is lost.
    The same use case works perfectly fine in Jdev 11.1.1.5.
    For reference:
    I created a sample test case(Dept/Emp) in jdev version 11.1.1.5, which works fine. Workspace: http://adf-use-cases.googlecode.com/files/TreeTable1.rar
    But the same test case, when i created in jdev version 11.1.2.0, gives issues. Workspace: http://adf-use-cases.googlecode.com/files/TreeTableUseCase.rar
    If you download the application and run in respective jdev version, you will get to know more about the issue.
    Please let me know, If I am doing anything wrong in the implementation of this use case.
    Any help/suggestions are appreciated.
    Thanks
    Umesh
    Note: My complete application is in Jdev 11.1.2.0, so I can't degrade my jdev version to 11.1.1.5.

    Thanks Frank for the reply.
    But upgrading the jdeveloper to 11.1.2.2 is not an ideal solution for us now, because of the size of the project.
    Some how, the issue of refreshing the tree table is resolved. I am using a command button with clientComponent to true and causing a full page refresh.
    I am not sure, if this is a perfect solution.
    As you said, that this behavior may be an issue with the Jdev version 11.1.2.0, I am using. I am going with the above said approach.

  • How to use tree tables with CRUD operation for begineers ADF 11g

    This is Friday night call for help.
    This is only few sample ressources on the web for tree table and only one with CRUD operation.
    I used this one http://jobinesh.blogspot.com/2010/05/crud-operations-on-tree-table.html because this is the only one that address CRUD.
    And it is shaky. Deletion works fine but insertion not very well. This is working using custom code provided below.
    Depending if the user selection in the tree, the code insert from the master node to the children node.
    Any other options because it is not working well.
    Also where Oracle describes how to use the row, rowset, itorator API? This is really hard to understand like almost if we should not use it.
    then if not how can I insert in tree with two nodes and insert in the parent or children depending the users selection.
    Lately I 'been posting questions on this forum with no response. This hurts. I understand developers cannot spend their time on this but People from Oracle, please help. We pay licenses...
    public void createChildren(RowIterator ri, Key selectedNodeKey) {
    final String deptViewDefName = "model.DepartmentsView";
    final String empViewDefName = "model.EmployeesView";
    if (ri != null && selectedNodeKey != null) {
    Row last = ri.last();
    Key lastRowKey = last.getKey();
    // if the select row is not the last row in the row iterator...
    Row[] found = ri.findByKey(selectedNodeKey, 1);
    if (found != null && found.length == 1) {
    Row foundRow = found[0];
    String nodeDefname =
    foundRow.getStructureDef().getDefFullName();
    if (nodeDefname.equals(deptViewDefName)) {
    RowSet parents =
    (RowSet)foundRow.getAttribute("EmployeesView");
    Row childrow = parents.createRow();
    parents.insertRow(childrow);
    } else {
    RowSet parents =
    (RowSet)foundRow.getAttribute("EmployeesView");
    Row childrow = parents.createRow();
    childrow.setAttribute("DepartmentId",
    foundRow.getAttribute("DepartmentId"));
    parents.insertRow(childrow);
    } else {
    System.out.println("Node not Found for " + selectedNodeKey);
    }

    I am looking for a sample that describe how to design a jsf page with a tree table.
    So you have Department and employees. In the tree first comes Department and if you click the node you see the employees assigned to this department.
    I need to be able to insert a new department or a new employee from the tree table by clicking on a insert button in the panel collection toolbar depending on user selection in the tree.
    I got part of it working but not good enough.
    By problem is the get insertion working
    I have a createChildren method in my AM implementation that get in input a RowIterator and selected node key.
    To goal is to create new records depending of the user selection and the input parameters get populated by the binding like this:
    #{backing_treeSampleBean.selectedNodeRowIterator} #{backing_TreeSampleBean.selectedNodeRowkey} via method binding with parameters.
    Is it the right approach?
    First to be able to insert a parent record, I select nothing in the tree and ri and selectedNodeKey comes to null
    we run this code
    ViewObjectImpl vo = getSchHolidaySchedExceptionsView1();
    //ViewObjectImpl vo = getDepartmentsView1();
    Row foundRow = vo.first();
    Row childrow = vo.createRow();
    vo.insertRow(childrow);
    A new blank entry appears in the parent node and we enter a value.
    The the problem starts when we want to add a child to this parent.
    We select the created parent and press the insert button, this code get executed
    if (nodeDefname.equals(deptViewDefName))
    //list of the children of the parent and create an new row
    RowSet childRows = (RowSet)foundRow.getAttribute("SchHolidayExceptionDatesView");
    Row childrow = childRows.createRow();
    childRows.insertRow(childrow);
    But the new entry does not appear, it is almost like it would be created for a different parent because this is a mandatory field that is not feel in yet and the interface complaints of a missing value. It is created somewhere just not a the right place... This is my guess.
    Do you see something wrong with the code?
    The full code og my create children method is there below
    I am using jdeveloper 11.1.1.3.0 any issues with tree table to know about with this version?
    Thanks for your help
    public void createChildren(RowIterator ri, Key selectedNodeKey) {
    final String deptViewDefName = "com.bcferries.app.pdfroutesched.model.SchHolidaySchedExceptionsView";
    final String empViewDefName = "com.bcferries.app.pdfroutesched.model.SchHolidayExceptionDatesView";
    if (ri != null && selectedNodeKey != null) {
    // last row
    Row last = ri.last();
    Key lastRowKey = last.getKey();
    // if the select row is not the last row in the row iterator...
    Row[] found = ri.findByKey(selectedNodeKey, 1);
    if (found != null && found.length == 1) {
    // foundRow is the row selected
    Row foundRow = found[0];
    // The row selected can be the parent node or the child node
    String nodeDefname = foundRow.getStructureDef().getDefFullName();
    // if parent row
    if (nodeDefname.equals(deptViewDefName))
    //list of the children of the parent and create an new row
    //works but we try to resolve the creation of a parent
    RowSet childRows = (RowSet)foundRow.getAttribute("SchHolidayExceptionDatesView");
    Row childrow = childRows.createRow();
    //childrow.setAttribute("HolidayDate", new java.util.Date().getDate());
    System.out.println("insert child row from master");
    childRows.insertRow(childrow);
    } else
    //RowSet ParentRow = (RowSet)foundRow.getAttribute("SchHolidaySchedExceptionsView");
    //RowSet childRows = (RowSet)ParentRow.first().getAttribute("SchHolidayExceptionDatesView");
    Row childrow = ri.createRow();
    System.out.println("insert child row from child ");
    } else {
    System.out.println("Node not Found for " + selectedNodeKey);
    } else {
    System.out.println(" param null try creating for first row : " +
    ri + " * " + selectedNodeKey);
    ViewObjectImpl vo = getSchHolidaySchedExceptionsView1();
    Row foundRow = vo.first();
    Row childrow = vo.createRow();
    vo.insertRow(childrow);
    }

  • [SOLVED] Multiple Dynamic View Objects and View Links - ADF Tree Table

    Hi all,
    I've got a method that creates 3 dynamic viewobjects using this:
                ViewDefImpl Level1ViewDef = new ViewDefImpl("Level1View");
                Level1ViewDef.addViewAttribute("LevelDescription","LEVEL1_DESCRIPTION",String.class);
                Level1ViewDef.addViewAttribute("SetOfBooksId","SET_OF_BOOKS_ID",Number.class);
                Level1ViewDef.addViewAttribute("CodeCombinationId","CODE_COMBINATION_ID",Number.class);
                Level1ViewDef.addViewAttribute("Level1","LEVEL1",String.class);
                Level1ViewDef.addViewAttribute("AccountType","ACCOUNT_TYPE",String.class);
                Level1ViewDef.addViewAttribute("PeriodYear","PERIOD_YEAR",Number.class);
                Level1ViewDef.addViewAttribute("PeriodNum","PERIOD_NUM",Number.class);
                Level1ViewDef.addViewAttribute("PeriodName","PERIOD_NAME",String.class);
                Level1ViewDef.addViewAttribute("PtdActual","PTD_ACTUAL",Number.class);
                Level1ViewDef.addViewAttribute("YtdActual","YTD_ACTUAL",Number.class);
                Level1ViewDef.addViewAttribute("LtdActual","LTD_ACTUAL",Number.class);
                Level1ViewDef.addViewAttribute("BudgetName","BUDGET_NAME",String.class);
                Level1ViewDef.addViewAttribute("BudgetVersionId","BUDGET_VERSION_ID",Number.class);
                Level1ViewDef.addViewAttribute("PtdBudget","PTD_BUDGET",Number.class);
                Level1ViewDef.addViewAttribute("YtdBudget","YTD_BUDGET",Number.class);
                Level1ViewDef.addViewAttribute("LtdBudget","LTD_BUDGET",Number.class);
                Level1ViewDef.addViewAttribute("EncumbranceType","ENCUMBRANCE_TYPE",String.class);
                Level1ViewDef.addViewAttribute("EncumbranceTypeId","ENCUMBRANCE_TYPE_ID",Number.class);
                Level1ViewDef.addViewAttribute("PtdCommitment","PTD_COMMITMENT",Number.class);
                Level1ViewDef.addViewAttribute("YtdCommitment","YTD_COMMITMENT",Number.class);
                Level1ViewDef.addViewAttribute("LtdCommitment","LTD_COMMITMENT",Number.class);
                Level1ViewDef.setQuery(sql_level1);
                Level1ViewDef.setFullSql(true);
                Level1ViewDef.setBindingStyle(SQLBuilder.BINDING_STYLE_ORACLE_NAME);
                Level1ViewDef.resolveDefObject();
                Level1ViewDef.registerDefObject();
                ViewObject vo1 = createViewObject("Level1View",Level1ViewDef);I can create the view objects fine and create a single viewlink between two of them, however i'm getting problems with 2 view links.
    This is how I'm creating a view link:
                ViewLink Level2Level1FKLink = createViewLinkBetweenViewObjects("Level2Level1FKLink1",
                                                        "Level2View",
                                                        vo1,
                                                        new AttributeDef[]{
                                                          vo1.findAttributeDef("Level1")
                                                        vo2,
                                                        new AttributeDef[]{
                                                          vo2.findAttributeDef("Level1")
                                                        "LEVEL1 = :Bind_Level1");
                ViewLink Level3Level2FKLink = createViewLinkBetweenViewObjects("Level3Level2FKLink1",
                                                        "Level3View",
                                                        vo2,
                                                        new AttributeDef[]{
                                                          vo2.findAttributeDef("Level2")
                                                        vo3,
                                                        new AttributeDef[]{
                                                          vo3.findAttributeDef("Level2")
                                                        "LEVEL2 = :Bind_Level2");I can get the data to display on an adf tree table if i'm only using a single view link, but when i try and implement 2 view link (for 3 levels on the adf tree table) i'm getting problems displaying the data.
    I'm getting the following error:
    Aug 10, 2007 2:44:39 PM oracle.adfinternal.view.faces.renderkit.core.xhtml.PanelPartialRootRenderer encodeAll
    SEVERE: Error during partial-page rendering
    oracle.jbo.NoDefException: JBO-25058: Definition Level3View of type Attribute not found in Level2View_Level2Level1FKLink1_Level2ViewThe thing is, Level3View isn't in the Level2Level1FKLink viewlink.
    I've been reading about something similar here
    BC4J Master-Detail-Detail
    but I am still unsure of what the problem is.
    Thanks in advance.

    I found the answer here:
    http://radio.weblogs.com/0118231/stories/2004/06/10/correctlyImplementingMultilevelDynamicMasterDetail.html

  • Insert an HTML Table tag as a value in a Tree Table

    Hi helper,
    Can I insert an HTML Table tag inside a TreeTable (Hierarchical data) using AdvancedDataGrid as a value?
    I need to create a Tree table in flex and I have beside normal int values some cells that need to show a certain images in an HTML Table I will create.
    Is it possible?
    Please advice
    Thanks
    Jo

    <div class=Section1><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>It depends on where you get the list of images<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>Alex Harui<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>Flex SDK Developer<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><a href="http://www.adobe.com/"><span style='color:blue'>Adobe<br />Systems Inc.</span></a><o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>Blog: <a href="http://blogs.adobe.com/aharui"><span<br />style='color:blue'>http://blogs.adobe.com/aharui</span></a><o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><br /><br /><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span<br />style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Yossi Bar<br />[mailto:[email protected]] <br><br /><b>Sent:</b> Monday, February 09, 2009 1:14 AM<br><br /><b>To:</b> [email protected]<br><br /><b>Subject:</b> Re: Insert an HTML Table tag as a value in a Tree Table<o:p></o:p></span></p><br /><br /></div><br /><br /><p class=MsoNormal><o:p> </o:p></p><br /><br /><p class=MsoNormal style='margin-bottom:12.0pt'>A new message was posted by<br />Yossi Bar in <br><br /><br><br /><b>Developers</b> --<br><br />  Insert an HTML Table tag as a value in a Tree Table<br><br /><br><br />Thanks Alex, <br><br />What is the way to implement HorizontalLIst of images for<br />AdvancedDataGridColumn? <br><br /><br><br />In the code here I create a tree table and in Actual column I show an image: <br><br /><br><br />&lt;mx:AdvancedDataGrid width=&quot;100%&quot; height=&quot;100%&quot;<br />folderClosedIcon=&quot;{null}&quot; folderOpenIcon=&quot;{null}&quot;<br />defaultLeafIcon=&quot;{null}&quot;&gt; <br><br /><br><br />&lt;mx:dataProvider&gt; <br><br />            &lt;mx:HierarchicalData<br />source=&quot;{dpHierarchy}&quot;/&gt; <br><br />        &lt;/mx:dataProvider&gt; <br><br />        &lt;mx:groupedColumns&gt; <br><br />         &lt;mx:AdvancedDataGridColumn<br />headerText=&quot;&quot; width=&quot;50&quot;/&gt; <br><br />            &lt;mx:AdvancedDataGridColumn<br />dataField=&quot;Region&quot; backgroundColor=&quot;haloSilver&quot;<br />headerText=&quot;Region title&quot;<br />headerRenderer=&quot;mx.controls.Label&quot;/&gt; <br><br />            &lt;mx:AdvancedDataGridColumnGroup<br />headerText=&quot;Group Header&quot;<br />headerRenderer=&quot;mx.controls.Label&quot;&gt; <br><br />&lt;mx:AdvancedDataGridColumn dataField=&quot;Territory_Rep&quot;<br />headerText=&quot;Territory Rep&quot;<br />headerRenderer=&quot;mx.controls.Label&quot;/&gt; <br><br />&lt;mx:AdvancedDataGridColumn dataField=&quot;Actual&quot;<br />headerText=&quot;Actual title&quot;<br />headerRenderer=&quot;mx.controls.Label&quot;&gt; <br><br />&lt;mx:itemRenderer&gt; <br><br />&lt;mx:Component&gt; <br><br />&lt;mx:VBox horizontalAlign=&quot;center&quot;&gt; <br><br />&lt;mx:Image width=&quot;50&quot; source=&quot;{data.Actual}&quot;/&gt; <br><br />&lt;/mx:VBox&gt; <br><br />&lt;/mx:Component&gt; <br><br />&lt;/mx:itemRenderer&gt; <br><br />&lt;/mx:AdvancedDataGridColumn&gt; <br><br /><br><br />&lt;mx:AdvancedDataGridColumn dataField=&quot;Estimate&quot;<br />headerText=&quot;Estimate title&quot; headerRenderer=&quot;mx.controls.Label&quot;/&gt;<br /><br><br />            &lt;/mx:AdvancedDataGridColumnGroup&gt;<br /><br><br />        &lt;/mx:groupedColumns&gt; <br><br />    &lt;/mx:AdvancedDataGrid&gt; <br><br /><br><br />Please advise, <br><br /><br><br />Thanks <br><br /><br><br />Jo <o:p></o:p></p><br /><br /><div class=MsoNormal><br /><br /><hr size=2 width=200 style='width:150.0pt' align=left><br /><br /></div><br /><br /><p class=MsoNormal style='margin-bottom:12.0pt'>View/reply at <a<br />href="http://www.adobeforums.com/webx?13@@.59b7d1ae/2">Insert an HTML Table tag<br />as a value in a Tree Table</a><br><br />Replies by email are OK.<br><br />Use the <a<br />href="http://www.adobeforums.com/webx?280@@.59b7d1ae!folder=.3c060fa3">unsubscribe</a>< br />form to cancel your email subscription.<o:p></o:p></p><br /><br /></div>

  • Question on the ADF Tree Table

    Hi, I am using Jdev 10.1.3.2 and ADF BC. I have created a ADF Tree Table to display multiple attributes, both the master and detail VO are based on the same EO. It seems all of attributes are displayed in one colume, and there is no column heading, is that possible to add column heading and display in multiple columns?
    Thanks!

    Hi,
    actually the node stamp doesn't accept more than one column element
    Frank

  • How to add a button in the child node of the Tree Table?

    Hi All,
    I am having a requirement to create a tree table and it should have a delete button to each child node (screenshot attached).
    Can anyone provide me a sample for how to implement this.
    Thanks in Advance
    Aravindh

    Hi Aravindhan,
    Try something like this:
    var ttDesvios = new sap.ui.table.TreeTable();
      var cbDesviacion = new sap.ui.commons.CheckBox();
      ttDesvios.addColumn(new sap.ui.table.Column({
      label: new sap.ui.commons.Label({text: "Col1"}),
      template: new sap.ui.commons.Label({text: "Info"}),
      width: "50px",
      ttDesvios.addColumn(new sap.ui.table.Column({
      label: new sap.ui.commons.Label({text: "Action"}),
      template: new sap.ui.commons.Button({text: "Delete"}).bindProperty("visible", "pathPropertyChild", function(value){
              if(value .............){ return true;} //For child
              else{ return false;} //For parent
      width: "160px",
    Regards
    EDIT: Wrong paste code, that's better!

  • Hi how can i fetch the data from tree table

    Hi i am designing a UI in which i am creating a java tree table as on sun java site http://java.sun.com/products/jfc/tsc/articles/treetable2/index.html now i have to fetch the perticular column value on the mouse click.I have implemented mouse listener and on mouse clicked event I tried :
    Object obj=tableInputOutputEntities.getValueAt(tableInputOutputEntities.getSelectedRow(),tableInputOutputEntities.getSelectedColumn());
    as we usually do in case on JTable but it is also throwing null exception. Again after going through forum i found some code to get the current row and current column selected values and tried with getValueAt(int,int) method but still it is throwing nulll pointer exception. Please help me out.
                         public void mouseClicked(MouseEvent e)
              Point p = e.getPoint();
              int row = treeTable.rowAtPoint(p);
              int column = treeTable.columnAtPoint(p);
              Object obj=treeTable.getValueAt(row,column);
              System.out.println("Object value: "+obj.toString());               
                                }Regards
    Naxy

    Hello Kevin,
    The question to use which method depend on your detail requirements. If you use BAPI, you need to find which Bapi can provide the data you want. Bapi normally use as a function called by external system. So you need to develop an external program like VB/Java to call this Bapi and move it to SQL. LSMW is use when you want to upload data from an external system to SAP. So it does not serve your requirement. Idoc can be use to export data to an external system. Again like Bapi, you need to find what Idoc can provide the data you want. However, it does not any programming from the external system. If I were you, based on your requirements, I think writing an Abap program that read the data you want and download it to NT/SQL server will be faster and easier.

  • GetSelectedRowKeys() returns more than one on Single Selection Tree Table

    Hi,
    I found that this issue occurring after PS3 (I think.)
    I have a tree table component, which allows single row selection. There is a listener on a column of the tree table as follows:
    public void listenPackageUnit(ValueChangeEvent valueChangeEvent)
    Object oldKey = getTreeComponent().getRowKey();
    try
    * Retrieve index of selected package unit
    * NOTE: Subtract 1 to remove no selection value. This only
    * needs to be done if attached LOV has No Selection option set.
    if (valueChangeEvent.getNewValue() != null)
    Row row = null;
    String selectedPackageUnit = null;
    int packageUnitIndex = (Integer) valueChangeEvent.getNewValue();
    packageUnitIndex--;
    * Due to the no selection item, we need to prevent search of regular
    * iterator if index is < 0. In this case we know the user selected
    * the no selection (blank) value.
    if (packageUnitIndex >= 0)
    * Using index, determine the value of the selected package unit
    DCIteratorBinding packageUnitsIterator =
    (DCIteratorBinding) PasUiADFUtil.resolveExpression("#{bindings.PackageUnitsIterator}");
    Row newRow =
    packageUnitsIterator.getRowAtRangeIndex(packageUnitIndex);
    selectedPackageUnit = (String) newRow.getAttribute("LookupCode");
    RowKeySet selection = this.getTreeComponent().getSelectedRowKeys();
    if (selection != null && selection.getSize() > 0)
    for (Object facesTreeRowKey: selection)
    this.getTreeComponent().setRowKey(facesTreeRowKey);
    JUCtrlHierNodeBinding rowData =
    (JUCtrlHierNodeBinding) this.getTreeComponent().getRowData();
    row = rowData.getRow();
    setSelectedLabel((String) row.getAttribute("Label"));
    setSelectedLabelType((String) row.getAttribute("LabelType"));
    row.setAttribute("PackageUnit", selectedPackageUnit);
    getTreeComponent().setRowKey(oldKey);
    finally
    getTreeComponent().setRowKey(oldKey);
    The issue is that getSelectedRowKeys() returns more than one when the user selects a child row in the tree table.
    It seems to be returning the total number counting from the top parent through the child.
    (For example, if the child is the second generation, it returns 2, and if the third generation, it returns 3.)
    This is causing the issue that the method tries to update the attribute of the parent row with a value for the child row. (And it fails, because the attribute is updateable only while new.)
    I remember getSelectedRowKeys() always returned one, the selected child itself, when I coded this around October, 2010.
    Is this a design change after PS3? Why does it return more than one though the tree table is for single selection?
    How can I get around this issue?
    It would be truly appreciated if we can get any quick help, since we are at final testing phase of our product.
    Thank you,
    Tomo

    Hi Vinod,
    I found the solution. Thank you very much for your suggestions. :)
    Now my listenSelection (custom listener of the tree table) looks like below:
    public void listenSelection(SelectionEvent selectionEvent)
    Row currentRow;
    PasUiADFUtil.invokeEL("#{bindings.TransactionLabelTopLevelVO1.collectionModel.makeCurrent}",
    new Class[] { SelectionEvent.class },
    new Object[] { selectionEvent });
    Object oldKey = getTreeComponent().getRowKey();
    try
    if (this.getTreeComponent() != null)
    RowKeySet rks = this.getTreeComponent().getSelectedRowKeys();
    Iterator keys = rks.iterator();
    while (keys.hasNext())
    List key = (List) keys.next();
    this.getTreeComponent().setRowKey(key);
    JUCtrlHierNodeBinding node =
    (JUCtrlHierNodeBinding) this.getTreeComponent().getRowData();
    if (node != null)
    currentRow = node.getRow();
    if (currentRow != null)
    this.setSelectedRow(currentRow);
    setSelectedLabel((String) currentRow.getAttribute("Label"));
    setSelectedLabelType((String) currentRow.getAttribute("LabelType"));
    String shippedItemFlag =
    (String) currentRow.getAttribute("ShippedItemFlagValue");
    if (shippedItemFlag != null && shippedItemFlag.equals("1"))
    setDisableAdd(true);
    else
    setDisableAdd(false);
    finally
    getTreeComponent().setRowKey(oldKey);
    /* Refresh Action menu and buttons */
    RequestContext.getCurrentInstance().addPartialTarget(this.getActionMenu());
    RequestContext.getCurrentInstance().addPartialTarget(this.getToolbar());
    And my tree table is like below:
    <af:treeTable value="#{bindings.TransactionLabelTopLevelVO1.treeModel}"
    var="node" rowSelection="single" id="tt1"
    contentDelivery="immediate" fetchSize="25"
    emptyText="#{bindings.TransactionLabelTopLevelVO1.viewable ? commonFoundationMsgBundle.NO_DATA_TO_DISPLAY : commonFoundationMsgBundle.ACCESS_DENIED}"
    selectionListener="#{pageFlowScope.MaintainTransactionSerialAssociationBean.listenSelection}"
    binding="#{pageFlowScope.MaintainTransactionSerialAssociationBean.treeComponent}"
    summary="#{maintainAssociationUiBundle.CONTAINER_SERIAL_HIERARCHY}">
    <!-- Row Header -->
    The listener is now always getting the currently selected row only.
    Tomo

  • Getting an error while fetching the data and bind it in the Tree table

    Hi All,
    I am getting an error "A navigation paths parameter object has to be defined - " while fetching the data and bind it in the Tree table.
    Please find the code and screenshot below
    var oModel = new sap.ui.model.odata.ODataModel("../../../XXXX.xsodata/", true);
    var oTable = sap.ui.getCore().byId("table");
    oTable.setModel(oModel);
    oTable.bindRows({
        path: "/Parent",
        parameters: {expand: "Children"}
    Can anyone please give me a suggestion to rectify this?
    Thanks in Advance,
    Aravindh

    Hi All,
    Please see the below code. It works fine for me.
    var oController = sap.ui.controller("member_assignment");
    var oModel = new sap.ui.model.odata.ODataModel("../../../services/XXXX.xsodata/", true);
    var Context = "/PARENT?$expand=ASSIGNEDCHILD&$select=NAME,ID,ASSIGNEDCHILD/NAME,ASSIGNEDCHILD/ID,ASSIGNEDCHILD/PARENT_ID";
    var oTable = sap.ui.getCore().byId("tblProviders");
    oModel.read(Context, null, null, true, onSuccess, onError);
    function onSuccess(oEventdata){
        var outputJson = {};
        var p = 0;
        var r = {};
        try {
            if (oEventdata.results){
                r = oEventdata.results;
        } catch(e){
            //alert('oEventdata.results failed');
        $.each(r, function(i, j) {
            outputJson[p] = {};
            outputJson[p]["NAME"] = j.NAME;
            outputJson[p]["ID"] = j.ID;
            outputJson[p]["PARENT_ID"] = j.ID;
            outputJson[p]["DELETE"] = 0;
            var m = 0;
            if (j.ASSIGNEDCHILD.results.length > 0) {
                $.each(j.ASSIGNEDCHILD.results, function(a,b) {
                outputJson[p][m] = { NAME: b.NAME,
                                     ID : b.ID,
                                     PARENT_ID: b.PARENT_ID,
                                     DELETE: 1};
                m++;
            p++;
        var oPM = new sap.ui.model.json.JSONModel();
        oPM.setData(outputJson);
        oTable.setModel(oPM);
    function onError(oEvent){
        console.log("Error on Provider Members");
    oTable.bindRows({
        path:"/"
    Regards
    Aravindh

  • Tree table is not reflecting the updated model data changes at the front end

    I have two tables ,
    1) Provider table(tree table)  2)member table
    I have implemented drag and drop functionality using jQuery UI on both tables.
    In my scenario when I drag a member from the member table and drop it on the Provider table and also when I delete an assigned member from the provider table I will update the data fetched from odata model and again I will call the method which binds the data to the provider table so that the table will reflect the changes.
    here is the code,
    on drop:
    $("#Provider tbody tr").droppable({
      drop: function(event){
           oController.AssignMember(oProviderId, oMemberId)
      }).disableSelection();
    Assign member function:   here am updating the model.
    AssignMember : function(oProviderId, oMemberId){
      var oModel = new sap.ui.model.odata.ODataModel("../../../services/provider.xsodata/", true);
      var oParameters = {};
      oParameters.PROVIDER_ID = oProviderId;
      oParameters.MEMBER_ID = oMemberId;
      oParameters.CREATED_ON = new Date();
      oModel.setHeaders({"content-type" : "application/json;charset=utf-8"});
      oModel.create( "/PROVIDERMEMBERS", oParameters, null, function() {
      var oController = sap.ui.controller("adsm.provider.member_assignment_view");
      oController.GetProviderData();
      },function(jqXHR) {
      var errorMessage = jqXHR.response.body;
      var jsondata = JSON.parse(errorMessage);
      sap.ui.commons.MessageBox.alert(jsondata.error.message.value);
    GetProviderData function: here i bind the data to the table
    GetProviderData: function(){
    var oModel = new sap.ui.model.odata.ODataModel("../../../services/provider.xsodata/", true);
    var Context = "/PROVIDERS?expand=ASSIGNEDMEMBERS&$select=NAME,ID,ASSIGNEDMEMBERS/NAME,ASSIGNEDMEMBERS/ID,ASSIGNEDMEMBERS/PROVIDER_ID";
      var oTable = sap.ui.getCore().byId("tblProviders");
      oModel.read(Context, null, null, true, onSuccess, onError);
      function onSuccess(oEventdata){
      var outputJson = {};
      var p = 0;
      var r = {};
      if (oEventdata) {
      r = oEventdata;
      try {
      if (oEventdata.d){
      r = oEventdata.d;
      } catch(e){
      //alert('oEventdata.d failed');
      try {
      if (oEventdata.d.results){
      r = oEventdata.d.results;
      } catch(e){
      //alert('oEventdata.d.results failed');
      try {
      if (oEventdata.results){
      r = oEventdata.results;
      } catch(e){
      //alert('oEventdata.results failed');
      $.each(r, function(i, j) {
      outputJson[p] = {};
      outputJson[p]["NAME"] = j.NAME;
      outputJson[p]["ID"] = j.ID;
      outputJson[p]["PROVIDER_ID"] = j.ID;
      outputJson[p]["DELETE"] = 0;
      var m = 0;
      if (j.ASSIGNEDMEMBERS.results.length > 0) {
      $.each(j.ASSIGNEDMEMBERS.results, function(a,b) {
      outputJson[p][m] = { NAME: b.NAME,
      ID : b.ID,
      PROVIDER_ID: b.PROVIDER_ID,
      DELETE: 1};
      m++;
      p++;
    var oModel = new sap.ui.model.json.JSONModel();
      oModel.setData(outputJson);
      oTable.setModel(oModel);
      function onError(oEvent){
      console.log("Error on Provider Members");
    oTable.bindRows({
      path:"/"
    Its working fine in chrome but in IE the model data gets updated but the table is not reflecting the changes at front end.Can anyone suggest me a possible solution to fix this?
    Please have a look at the attached screen shots.
    Best regards,
    Amala Suganya.

    Hi Amala,
    I think this will help you:
    Disabling Cache for CRUD/FI OData scenarios for a UI5 Application on Internet Explorer
    Kind regards,
    RW

  • Bad performance when iterating/updating the rows of a tree table

    Hello,
    we have a tree table based on a VO and EO (with transient attributes). One of the attribute is a flag.
    The VO is populated with a complex query having many thousands of rows.
    Now, when the user clicks on a parent node, all the children are updated (their flag is set to true) recursively.
    This is really really slow. It might require several minutes, while a similar update via PL/SQL on a real table would required few seconds.
    Is there any way to improve the performance? We have already applied all the tunings on both the EO and VO mentioned in Oracle Documentation, but they had almost no effect:
    - retain viewlink row set iterators
    - query hints
    - Use update batching
    The algorithm we use is the following:
        private void checkTreeNodes(JUCtrlHierNodeBinding node, Boolean check) {
            if (node == null) {
                return;
           TreeVORowImpl nodeRow = (TreeVORowImpl)node.getRow();
            if (nodeRow != null) {
                    nodeRow.setFlag(check);
            List<JUCtrlHierNodeBinding> children = null;
            if (!nodeRow.getLevel().equals("4"))  // no more than 4 levels
                children = node.getChildren();
            if (children != null) {
                for (JUCtrlHierNodeBinding _node : children) {
                    checkTreeNodes(_node, check);
        }

    Thanks for you answer.
    I am trying to move the logic in a method of the AM. But I have an exception (jdev 11.1.2.1):
        public void checkTreeNodes(TreeVORowImpl node, Boolean check, int level) {
            if (node == null)
                return;
            node.setFlag(check);
            if (level >= 4)
                return;
            Key key = new Key(new String[] { node.getId() }); // Id is the primary Key
            // By debugging via System.out.println, the code stops here:
            RowIterator rowIt = getMyVO().findByAltKey("ParentId", key , -1, false); // children have ParentId = Id
            while (rowIt.hasNext()) {
                TreeVORowImpl row = (TreeVORowImpl)rowIt.next();
                checkTreeNodes(row, check, level + 1);
        }findByAltKey gives the following exception (since it's called from the UI by getting the AM from DataControl):
    oracle.jbo.InvalidObjNameException: JBO-25005: [...]
         at oracle.adf.model.binding.DCBindingContainerState.validateStateFromString(DCBindingContainerState.java:573)
         at oracle.adf.model.binding.DCBindingContainerState.validateStateFromString(DCBindingContainerState.java:504)
         at oracle.adf.model.binding.DCBindingContainerState.validateToken(DCBindingContainerState.java:684)
    Do you see anything wrong or not efficient?
    Thanks.

  • ADF Issue with Tree Table , Child Row not getting rendered.

    Hi All,
    I am trying to show a single Level Master-Detail Table via ADF Tree Table.
    I have MasterVO : InventoryVO (1 SubInventoryCode)
    DetailVO: SubInventoryVO (n :SubInventoryCode)
    Both VOs are SQL query based VO with bindVariables.
    I have a viewLink between MasterVO and ChildVO (1:n relationship)
    I dragged and drop the MasterVO as a tree Table. I added the Rule in the Tree Binding too.
    I have the Tree table under a Tab , I execute the AM impl method when the Tab is clicked where I set the bindvariables of the MasterVO and ChildVO and execute it.
    when I run the Page , the VO query gets executed but the I am able to see only the MasterVO Datas, and when I click MasterVO ROW , the Table doesnt expand and it doesnt render any ChildVO ROws.
    Please find the Page Definition and Jspx Page Code Below
    Page Definition Code
    <tree IterBinding="ItemsLocatorIterator" id="ItemsLocator">
          <nodeDefinition DefName="xxplp.oracle.adf.items.model.view.ItemsLocatorVO"
                          Name="ItemsLocator0">
            <AttrNames>
              <Item Value="SubinventoryCode"/>
              <Item Value="Openorderqty"/>
              <Item Value="Openwoqty"/>
              <Item Value="Qoh"/>
            </AttrNames>
            <Accessors>
              <Item Value="ItemSubInventoryVO"/>
            </Accessors>
          </nodeDefinition>
          <nodeDefinition DefName="xxplp.oracle.adf.items.model.view.ItemSubInventoryVO"
                          Name="ItemsLocator1">
            <AttrNames>
              <Item Value="Locator"/>
            </AttrNames>
          </nodeDefinition>
        </tree>Jspx Page Code
    <af:treeTable value="#{bindings.ItemsLocator.treeModel}"
                                          var="node"
                                          selectionListener="#{bindings.ItemsLocator.treeModel.makeCurrent}"
                                          rowSelection="single" id="tt2"
                                          styleClass="AFStretchWidth"
                                          rowDisclosureListener="#{backingBeanScope.TabListenerBean.LocationTableRowDisclosureListener}">
                              <f:facet name="nodeStamp">
                                <af:column id="c110">
                                  <af:outputText value="#{node.SubinventoryCode}" id="ot116"/>
                                </af:column>
                              </f:facet>
                              <f:facet name="pathStamp">
                                <af:outputText value="#{node}" id="ot117"/>
                              </f:facet>
                              <af:column id="c111"
                                         headerText="#{bindings.ItemsLocator.hints.Qoh.label}">
                                <af:outputText value="#{node.Qoh}" id="ot118"/>
                              </af:column>
                              <af:column id="column1"
                                         headerText="#{bindings.ItemsLocator.hints.Openorderqty.label}">
                                <af:outputText value="#{node.Openorderqty}"
                                               id="outputText1"/>
                              </af:column>
                              <af:column id="column2"
                                         headerText="#{bindings.ItemsLocator.hints.Openwoqty.label}">
                                <af:outputText value="#{node.Openwoqty}"
                                               id="outputText2"/>
                              </af:column>
                              <af:column id="column3"
                                         headerText="Locator">
                                <af:outputText value="#{node.Locator}"
                                               id="outputText3"/>
                              </af:column>
                            </af:treeTable>

    I was able to find the issue which is causing the problem, both the VOs are SQL Query Based VOs.
    The ChildVO (SubInventoryVO) is has a bindvariable in its Query, which is losing its value when the viewlink accessor query gets appended to it.
    Please find the query below
    SELECT * FROM (SELECT MOTV.ORGANIZATION_CODE, MOTV.SUBINVENTORY_CODE  
    FROM MTL_ONHAND_TOTAL_V MOTV
    WHERE INVENTORY_ITEM_ID = :P_INVENTORY_ITEM_ID) QRSLT  WHERE ORGANIZATION_CODE = :Bind_OrganizationCode Though I am setting the VO query before the Table is rendered, ":P_INVENTORY_ITEM_ID".
    Its Losing its value, when the above whereclause "ORGANIZATION_CODE = :Bind_OrganizationCode " gets appended to it.
    I am thinking to use ExecuteWithParams Operation on SelectionListener method of the Tree Table to set the ":P_INVENTORY_ITEM_ID" bind variable, but I also want the viewLinkAccessor rule also to be applied ..
    Please suggest me how to retain the implicit bindVariable of the Query.

  • Issue with ADF Tree Table

    Hi,
    I have the following requirement where i need to display a tree table. Here is how the initial implementation is:
    I have created the read only view for : ManagersVO > PoolsVO > MachinesVO. Where 'MachinesVO' is the destination view. And created view links between ManagersVO & PoolsVO using ManagerId and PoolsVO & MachinesVO using PoolId.
    And using this implementation, successfully created tree table on the UI. Now we got an enhancement for this:
    i.e., MachinesVO should return list of machines as per user logs in. i.e., we have 4 different roles. 'Super Admin', 'Sys Admin', 'App Admin', 'End User'. The default query for MachinesVO is for 'Super Admin'. The query for other user roles is different except the SELECT statement.
    The requirement is to dynamically change the query of MachinesVO based on user logs in and display the tree table accordingly. To implement the same i have tried using setQuery() operation on 'MachinesVO' which results with the following error:
    JBO-26016: InvalidOperException
    Cause: You cannot set customer query (calling setQuery()) on a view object if it is the detail view object in a master detail view link.
    Action: Do not call setQuery() if the view object is a detail.
    Can one suggest me a best solution to implement this.
    Thanks & Regards,
    Kiran

    Hi Navaneetha Krishnan,
    Here is how i implemented based on your comments. As i have tree table based 3 different VO's, created the following method at middle view(i.e., PoolsVO).
    1.Tree Model hierarchy
    ManagersVO > PoolsVO > MachinesVO
    I actually want to filter the data at Machines level. Hence wrote a method at PoolsVOImpls and exposed it in the PoolsVO client interface. Here is the code that i have placed in the PoolVOImpl
    public class PoolsVOImpl extends ViewObjectImpl implements PoolsVO{
         * This is the default constructor (do not remove).
        public PoolsVOImpl () {
      public void filterMachinesDataByUserRole(String userRole,String vzId){
        Row row = getCurrentRow();
        String query = "";
        if(row != null){
          RowSet rowSet = (RowSet)row.getAttribute("MachinesVO");
          if(rowSet != null){
            MachinesVOImpl machinesVOImpl = (MachinesVOImpl)rowSet.getViewObject();
            if(userRole.equalsIgnoreCase("SYS ADMIN")){
                    machinesVOImpl .setWhereClause(query related to sysadmin);
             //Similarly for other user roles.
             executeQuery();
    }And this piece of code needs to be executed before the jsff(which has the tree table) renders. Hence, i created a this methodAction as a default activity in the respective taskflow where the jsff is placed. Once this method get executed, the page should render the machines specific to the user.
    Here is the issue: getCurrentRow() method call is returning always NULL.
    Please correct me if i'm doing something wrong. I do tried the above mentioned approach by creating the method at '*ManagersVOImpl*' level too. Still the same issue.
    Thanks & Regards,
    Kiran

Maybe you are looking for

  • Computer Locks up/hangs in various scenarios

    So, I just built this computer a few months ago. As soon as I started using it, I was getting hangs/lock ups and random reboots. At first it was quite random, but as time progressed, it seems to only be affected by some certain actions. What I've fou

  • Rdobe reader 9.0 download

    Free Adobe reader 9.0

  • Can I Use HDMI and Thunderbolt Outputs At The Same Time? And Mac App Store Issues

    I have a Mid-2011 Mac Mini. I am currently using the HDMI output with an HDMI to Digital Input for a dell monitor. If I wanted to have a second monitor, can I use the Thunderbolt output with a MiniDisplayport to VGA adapter? I know it may sound a lit

  • Navigation bar missing

    the navigation bar is missing from the insert dropdown panel according to the picture in help it should be directly under fireworks HTML and it is not any suggestions?

  • Abstract Trace into a string

    HI Folks, I am working on a graphical mapping and I am using a global container to write all my traces say     trace.addInfo("Line 1");   trace.addInfo("Line 4"); etc etc Now I want to retrieve  the trace information and return them as a string or an