TreeTable based on one simple VO. Is this possible?

Hello,
consider, as an example, a single read-only VO based on a query on a number of different tables, which gives a result similar to:
ID | PARENT_ID
1  | null
2  | 1
3  | 2
4  | null
5  | 4
6  | 5The table above represents the following tree:
1
|_2
  |_3
4
|_5
  |_6Is there a concrete and fast way to represent the tree above with an af:treeTable component starting from the given SQL query (without requiring to extend it with Java code).
To be precise the treeTable above will have two rows when totally collapsed (marked with "1" and "4"). For example, once "1" is expanded, it will show a "2" as sub-row, and so on...
I would appreciate concrete solutions, maybe based on the above set of records.
Thanks.

Plase help.
I have followed all the instructions carefully twice, but there still some problems expanding the second level.
I obtain an exception that I will show you later.
First of all let me give you all the steps I have done in my simple project.
At the end of the thread I will also give you all the necessary data from my simple project, so that you can reply by yourself with simple copy and paste.
1. I made a Read-Only VO based on this simple query (the real query will take its data from complex tables):
select MyID, PARENT_ID from TREETREE is actually a table on a database containing the following data, returned by the query above:
MyID | PARENT_ID
1      null
2      1
3      2
4      null
5      4
6      4
7      5As you can see, there are two root nodes, "1" and "4". Under the first one there is node "2". Under the second root there are nodes "5" and "6". Leafs are "3" and "7".
2. I made a ViewLink on the above TreeVO. This ViewLink has caridanlity 1..*. Where Source is MyId and Destination is "Parent_ID".
3. I inserted an istance of the TreeVO in the Data Model of the application module. Then, by using the ViewLink above, I added a second instance of the TreeVO as child of the first instance. This is basically a two-level Master-Deatil relationship. According to your instructions, it's enough to represent a three-level tree table.
4. I added a ViewCriteria to the TreeVO and applied to the Master instance of TreeVO in the data model, so that "ParentID is null" will make the tree only show the root nodes "1" and "4" as top-level nodes.
5. I dragged and dropped the Master to the page and chose af:treetable component to represent the hierarchical data as a tree. I added an accessor Rule to the binding based on the ViewLink.
6. I run the page.
The result is that the tree component on the page shows the first two levels. Whenever I try to expand the second level I get an excpetion:
java.lang.IllegalStateException: ADFv: non allinterno di un contenitore.
     at oracle.adfinternal.view.faces.model.binding.FacesCtrlHierBinding$FacesModel.exitContainer(FacesCtrlHierBinding.java:870)
     at oracle.adfinternal.view.faces.model.FlattenedTreeCollectionModel.getRowIndex(FlattenedTreeCollectionModel.java:111)
     at oracle.adfinternal.view.faces.renderkit.rich.TreeRendererUtils$1.getRowIndex(TreeRendererUtils.java:750)
     at oracle.adfinternal.view.faces.renderkit.rich.TreeTableRenderer._renderChildNodesForExpandedNode(TreeTableRenderer.java:568)
     at oracle.adfinternal.view.faces.renderkit.rich.TreeTableRenderer.handleExpand(TreeTableRenderer.java:515)
     at oracle.adfinternal.view.faces.renderkit.rich.TableRenderer._handleDataFetch(TableRenderer.java:1610)
     at oracle.adfinternal.view.faces.renderkit.rich.TableRenderer.encodeAll(TableRenderer.java:560)
     at oracle.adfinternal.view.faces.renderkit.rich.TreeTableRenderer.encodeAll(TreeTableRenderer.java:638)
     at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
...Below are all the xml files in the project: the TreeVO, the ViewLink, the ApplicationModule and the Page.
<?xml version="1.0" encoding="windows-1252" ?>
<!DOCTYPE ViewObject SYSTEM "jbo_03_01.dtd">
<!---->
<ViewObject
  xmlns="http://xmlns.oracle.com/bc4j"
  Name="ViewObjVO"
  Version="11.1.2.60.81"
  BindingStyle="OracleName"
  CustomQuery="true"
  RowClass="oracle.jbo.server.ViewRowImpl"
  ComponentClass="oracle.jbo.server.ViewObjectImpl"
  FetchMode="FETCH_AS_NEEDED"
  PageIterMode="Full"
  UseGlueCode="false">
  <DesignTime>
    <Attr Name="_isExpertMode" Value="true"/>
  </DesignTime>
  <Properties>
    <SchemaBasedProperties>
      <LABEL
        ResId="model.views.ViewObjVO_LABEL"/>
    </SchemaBasedProperties>
  </Properties>
  <SQLQuery><![CDATA[select MYID, PARENT_ID from TREE]]></SQLQuery>
  <ViewAttribute
    Name="Myid"
    IsUpdateable="false"
    IsPersistent="false"
    PrecisionRule="true"
    Precision="255"
    Type="java.lang.String"
    ColumnType="VARCHAR2"
    AliasName="MYID"
    Expression="MYID"
    SQLType="VARCHAR">
    <DesignTime>
      <Attr Name="_DisplaySize" Value="100"/>
    </DesignTime>
  </ViewAttribute>
  <ViewAttribute
    Name="ParentId"
    IsUpdateable="false"
    IsPersistent="false"
    PrecisionRule="true"
    Precision="100"
    Type="java.lang.String"
    ColumnType="VARCHAR2"
    AliasName="PARENT_ID"
    Expression="PARENT_ID"
    SQLType="VARCHAR">
    <DesignTime>
      <Attr Name="_DisplaySize" Value="100"/>
    </DesignTime>
  </ViewAttribute>
  <ViewCriteria
    Name="ViewObjVOCriteria"
    ViewObjectName="model.views.ViewObjVO"
    Conjunction="AND">
    <Properties>
      <CustomProperties>
        <Property
          Name="displayOperators"
          Value="InAdvancedMode"/>
        <Property
          Name="autoExecute"
          Value="false"/>
        <Property
          Name="allowConjunctionOverride"
          Value="true"/>
        <Property
          Name="showInList"
          Value="true"/>
        <Property
          Name="mode"
          Value="Basic"/>
      </CustomProperties>
    </Properties>
    <ViewCriteria
      Name="ViewObjVOSubCriteria1"
      ViewObjectName="model.views.ViewObjVO"
      Conjunction="AND">
      <ViewCriteriaRow
        Name="ViewObjVOSubCriteria1_row_0"
        UpperColumns="1">
        <ViewCriteriaItem
          Name="ParentId"
          ViewAttribute="ParentId"
          Operator="ISBLANK"
          Conjunction="AND"
          Required="Optional"/>
      </ViewCriteriaRow>
    </ViewCriteria>
  </ViewCriteria>
  <ViewLinkAccessor
    Name="MyidViewObj"
    ViewLink="model.links.ViewLink"
    Type="oracle.jbo.RowIterator"
    IsUpdateable="false"/>
  <ResourceBundle>
    <PropertiesBundle
      PropertiesFile="model.ModelBundle"/>
  </ResourceBundle>
</ViewObject>
<?xml version="1.0" encoding="windows-1252" ?>
<!DOCTYPE ViewLink SYSTEM "jbo_03_01.dtd">
<!---->
<ViewLink
  xmlns="http://xmlns.oracle.com/bc4j"
  Name="ViewLink"
  Version="11.1.2.60.81">
  <Properties>
    <SchemaBasedProperties>
      <LABEL
        ResId="model.links.ViewLink_LABEL"/>
    </SchemaBasedProperties>
  </Properties>
  <ViewLinkDefEnd
    Name="ParentIdViewObj"
    Cardinality="1"
    Source="true"
    Owner="model.views.ViewObjVO">
    <DesignTime>
      <Attr Name="_finderName" Value="ParentIdViewObj"/>
      <Attr Name="_isUpdateable" Value="true"/>
    </DesignTime>
    <AttrArray Name="Attributes">
      <Item Value="model.views.ViewObjVO.Myid"/>
    </AttrArray>
  </ViewLinkDefEnd>
  <ViewLinkDefEnd
    Name="MyidViewObj"
    Cardinality="-1"
    Owner="model.views.ViewObjVO">
    <DesignTime>
      <Attr Name="_finderName" Value="MyidViewObj"/>
      <Attr Name="_isUpdateable" Value="true"/>
    </DesignTime>
    <AttrArray Name="Attributes">
      <Item Value="model.views.ViewObjVO.ParentId"/>
    </AttrArray>
  </ViewLinkDefEnd>
  <ResourceBundle>
    <PropertiesBundle
      PropertiesFile="model.ModelBundle"/>
  </ResourceBundle>
</ViewLink>
<?xml version="1.0" encoding="windows-1252" ?>
<!DOCTYPE AppModule SYSTEM "jbo_03_01.dtd">
<!---->
<AppModule
  xmlns="http://xmlns.oracle.com/bc4j"
  Name="AppModuleS3AMRet"
  Version="11.1.2.60.81"
  ComponentClass="oracle.jbo.server.ApplicationModuleImpl"
  ClearCacheOnRollback="true">
  <ViewUsage
    Name="ViewObj1"
    ViewObjectName="model.views.ViewObjVO">
    <ViewCriteriaUsage
      Name="ViewObjVOCriteria"
      FullName="model.views.ViewObjVO.ViewObjVOCriteria"/>
  </ViewUsage>
  <ViewUsage
    Name="ViewObj2"
    ViewObjectName="model.views.ViewObjVO"/>
  <ViewLinkUsage
    Name="ViewLink1"
    ViewLinkObjectName="model.links.ViewLink"
    SrcViewUsageName="model.views.AppModuleS3AMRet.ViewObj1"
    DstViewUsageName="model.views.AppModuleS3AMRet.ViewObj2"
    Reversed="false"/>
</AppModule>
<?xml version="1.0" encoding="UTF-8" ?>
<pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel" version="11.1.2.60.81" id="untitled1PageDef"
                Package="model.pageDefs">
  <parameters/>
  <executables>
    <variableIterator id="variables"/>
    <iterator Binds="ViewObj1" RangeSize="25" DataControl="AppModuleS3AMRetDataControl1" id="ViewObj1Iterator"/>
  </executables>
  <bindings>
    <tree IterBinding="ViewObj1Iterator" id="ViewObj1">
      <nodeDefinition DefName="model.views.ViewObjVO" Name="ViewObj10">
        <AttrNames>
          <Item Value="Myid"/>
        </AttrNames>
        <Accessors>
          <Item Value="MyidViewObj"/>
        </Accessors>
      </nodeDefinition>
    </tree>
  </bindings>
</pageDefinition>
<?xml version='1.0' encoding='windows-1252'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:f="http://java.sun.com/jsf/core"
          xmlns:h="http://java.sun.com/jsf/html" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
        <af:document title="untitled1.jspx" id="d1">
            <af:messages id="m1"/>
            <af:form id="f1">
                <af:panelStretchLayout id="psl1">
                    <f:facet name="center">
                        <!-- id="af_one_column_stretched"   -->
                        <af:treeTable value="#{bindings.ViewObj1.treeModel}" var="node"
                                      selectionListener="#{bindings.ViewObj1.treeModel.makeCurrent}"
                                      rowSelection="single" id="tt1">
                            <f:facet name="nodeStamp">
                                <af:column id="c1">
                                    <af:outputText value="#{node}" id="ot1"/>
                                </af:column>
                            </f:facet>
                            <f:facet name="pathStamp">
                                <af:outputText value="#{node}" id="ot2"/>
                            </f:facet>
                        </af:treeTable>
                    </f:facet>
                </af:panelStretchLayout>
            </af:form>
        </af:document>
    </f:view>
</jsp:root>Edited by: user10047839 on 12-gen-2012 5.13
Edited by: user10047839 on 12-gen-2012 5.18

Similar Messages

  • I have two separate itune accounts under two different email accounts and would like to combine them under one account.  Is this possible and if so, how do I do it?

    I have two separate itune accounts under two different email accounts and would like to combine them under one account.  Is this possible and if so, how do I do it?

    If you go to Settings > iTunes & AppStore , you can sign out from your account, and sign in with the one you've used to purchase apps.This will not remove any apps you already have on it.
    Then you can go to AppStore and download apps you've purchased (either via "Purchased" button in "Updates", or simply search for them and download them.
    That way you can have multiple accounts' apps on your iPad. When updating, you will be prompted for the credentials for account you've purchased given App with.

  • I have two Itunes Accounts and I would like to merge all Apps to one Account. Is this possible ?

    I have two Itunes Accounts and I would like to merge all Apps to one Account. Is this possible ?

    No. You can not.

  • My wife and I have seperate itune accounts, but want to merge them into one account or at least merge our seperate purchases into one library.  Is this possible?

    Basic problem...my wife has her own iTunes account which she purchases music with, I have my own that i have been purchasing music with...however, married now as we have similar tastes in music and dont want to be duplicating albums etc.
    Was wondering is it possible to merge the two accounts into one account?  Or if not, that we carry on purchasing music but have one shared library.  Is this possible, any help appreciated.
    Thanks

    "Was wondering is it possible to merge the two accounts into one account? "
    No.
    Just put all of your music/apps/etc on one computer/library.  Authorize the computer for both ids. 

  • HT4137 I want to keep my old ipad and the new one going.  Is this possible.?

    I want to keep my old ipad 2 and the new ipad 4. Is this possible.

    of course it is.  what is your actual question?

  • Why?... is it just to upload one simple app is this such a pain in the ***?

    all i want is to download a game on to my ipod , need help its taken me 1 hour it just keeps telling me to download **** that i allready did and don't care i just one to play a game on this compicated $400.00 regret i just bought

    Complicated?
    Since you haven't told us what steps you've taken to download this game, it's a little hard to say where you've gone wrong, but... this is what I do:
    Go to the AppStore in iTunes, find the game, click Download, plug the iPod touch into the computer and press Sync.
    It's all in the manual, by the way:
    http://manuals.info.apple.com/enUS/iPod_touch_3.1_UserGuide.pdf

  • Two Libraries on one computer? Is this possible?

    Hi- I am helping my parents get their ipods up and running. Is it possible to have two ipods/separate libraries on one computer? If so, do I need to download itunes 7 twice? My dad already has his library up and running on the computer and I need to add my mom's. Any advice would be much appreciated.
    Thank you in advance!

    Apologies to all concerned for this threadjacking. I'll make it brief and be on my way.
    <hr />
    toonz,
    If you have a chance, could you check this user's CD Diagnostics and share your thoughts.
    Thank you.

  • Two ipods with only one account..is this possible?

    My wife and i both have nanos. I would like to share the same itunes account with both ipods, yet when i plug hers into my itunes account i'm not able to load in the songs on my playlist to her nano? Can some one give me a hand with this. Thank you
    dell 4600   Windows XP  

    Welcome to Apple Discussions.
    Check this: Using Multiple iPods with one computer

  • 2 iphones on one mac? Is this possible?

    If I were to buy 2 iphones (one for me and one for my wife), could we have both phones linked to the same iMac? Are there any limitations to this? Would we share itunes library, etc?
    Thanks!

    Dan,
    It is absolutely possible to have 2 iPhones for one mac. iPhones are separately recognized by iTunes, just as different iPods are. As long as both phones are synched to the same user's account, the iTunes library would be shared. If you each sync your phone to separate accounts, the iPhone has access to the iTunes library associated with that user's account.

  • 2 Computers - One iTunes Library - is this possible?

    I have an iMac and a MacBook. Both have iTunes. Most of my music is on the iMac, but I occasionally purchase music on the MacBook. Both computers are usually used at home but in different locations and many times for different purposes. However, I do want to listen to music on both.
    With the new Airport Extreme 802.11n will it be possible to consolidate my music on an AirDisk (hard drive attached to the base station) and share the exact same library between 2 computers?
    Right now I can of course share libraries between the 2 computers but the libraries are completely separate. I'd like to consolidate to one.
    Thanks for any information you have.

    Curly Girl
    This is definitely possible.
    I have moved my library to my external hard drive following this procedure
    http://docs.info.apple.com/article.html?artnum=301748
    Then I just changed the location of the library on the second computer and compacted.
    At the moment i have mixed p.c. / Mac network - second mac gets back from the doctors tomorrow and i will experiment more.
    The thing I can't do is have the p.c. update when i change the library via the mac and visa-versa , still working on that one
    I think it would be easy to create a script/auto to sync the two library file on each mac, hopefully someone else here with greater knowledge can help
    Good luck
    MacBook (Black)   Mac OS X (10.4.8)  

  • Restricting the user to only one session. Is this possible ?

    We have a web enabled Forms6i application running on Unix AIX server. user logs on to this application through a application logon screen.
    We have a requirement where we have to restrict user from logging on more than once to the application.
    - We thought of implementing this functionality through a database field which get set and resets each time a user logs on and logs off the application. Issue here is when do u reset the field. ? Is there a trigger on form which fires no matter how user exits from the system , including PC crahs ?
    - is there a better way of handling this functionality.
    Any help will be appreciated.
    Thanks,
    Gana

    Try to use Oracle profiles
    create profile test limit
    sessions_per_user 1;
    then assign this profile to the users you want them to have one session only. Moreoever, you have to change the parameter LIMIT_RESOURCES=TRUE in the init.ora parameter file.
    After changing the parameter file, shutdwon the database and open it again to let the profiles take effect on the user session.
    Good luck

  • I want to delete all cookies when I close Firefox except for one website. Is this possible?

    I have a website bookmarked that I use frequently and I have set my preferences on the site. I have Firefox set to allow cookies from this site. Is there any provision to delete all cookies except this site when i close Firefox?

    There is a plugin for that, search "cookie" on the plugins site and you'll find it.

  • In contacts section for the groups section i want to delete old groups i have on the phone and then add a new group for easy access for work contacts for calling. rather then searching each individual contact when needed. is this possible?

    i currently have about 6 different groups listed on the iphone in my contact list section and i want to delete the old ones and create a new group for work puposes!
    i dont want any apps all i want is something similar to my favourites list but in a group so i can just go into that work group and scroll to the person i need to call and this way seperating my personal and work contacts.
    because i do alot of calls from my car i dont want to have to search my contact lists to find the right person i just want them all in a simple folder.
    is this possible because if i already have groups on my iphone i should be able to delete the old ones and create a new one?

    Deleting groups on the phone and creating new ones is not supported with iOS4, you'll have to do that on your computer and sync again.
    Let's see if they changed that in iOS5 when it is released.

  • Hi - Re Keynote  I'm trying to figure out how to create a music album on USB flash drive. What I want is a background picture with 'click-buttons' to play each track listed, also similar for embedded videos and photos etc.  Is this possible with Keynote ?

    Hi - Re Keynote  I'm trying to figure out how to create a music album (as an artist) on USB flash drive, (accessible by both Mac and PC). What I want is a background picture with 'click-buttons' to play each track listed, and play in order (like a cd) - also similar for embedded videos and photos etc. This should all be on the one page.  
    Is this possible with Keynote, or any other software package for Mac (am using Macbook Pro) ?
    Gav 88

    Hi there,
    Yikes, it sounds like you've been doing a lot of work on this project... Unfortunately, however, this isn't the Adobe Encore forum, but the Acrobat.com forum. While it seems like an exciting question, we're not able to address issues pertaining to other Adobe products and services. Here's a link to the Adobe Encore forum, where you're more likely to get help for this specific issue:
    http://forums.adobe.com/community/encore
    Sorry not to be of more specific help to you. Best of luck!
    Kind regards,
    Rebecca

  • Calling Forms 6i from Reports 6i. Is this possible. Run Product in Reports

    Re: Calling Forms 6i from Reports 6i. Is this possible?
    Hello,
    I have need programming in Oracle 9.x and using Forms and Reports for about 1.5 years. My ERP application calls a report from a form. I DO NOT have source code for the FORM. But, I DO have source code for the Report. So, from the Report 6i, I would like to call an Oracle Form 6i. Note: Not WEB based. My question is, IS THIS POSSIBLE. I can not find a command like Run Product in Report for calling a Form Application. Can someone please help me. I am under the gun to have this ready in a couple of days. Can I call an Active X Application from Reports..if Oracle Forms DOES NOT WORK. This needs to be a Form Application because of the nature of this request.
    Thank you
    Dennis

    Thank you
    ...the ERP vendor based on a form icon button will call a report. They will pass a TAG_NUMBER from a database record (that they just inserted) to the report. This tag_number will link to other tables and will display the report. The problem is ??..there is additional information that the user needs to scan into the database BEFORE the report runs. This is part of the business work flow.
    I have options.
    1) Get the ERP Vendor to call a FORM based on the name I provide to them.(Not really an option since they are unwilling to make custom mod changes.)
    2) Have the user key into the REPORTS PARM FORM. And I will update the tables...
    3) Call an Active OCX popup FORM from Reports and then update tables. Is this possible from Reports???..I am not sure if I like to introduce ms vb into an oracle application. It just does not seem to be a correct solution/procedure.
    4) Pay the ERP Vendor as a custom mod to make the changes for us. (unlikely because they do not like making custom mod changes)
    5) ....any more ideas/comments please let me know..
    Thank you Again
    Dennis Aubrey

Maybe you are looking for

  • Need solution for how to identify excat View in Material master tran (MM02)

    Hi,    Can any body help out of this,   I am doing MM02 updation for perticularly a field like Abnormal Quantity field in MRP2 View . I have done Recording using One material say XXX material so it is working for that material, But here issue is if 

  • ACS / NAC phase 2 / posture validation with symantec AV

    Hi, We encounter problem to implement NAC phase 2 with symantec. ACS is an appliance one, version 4.0 We?ve installed the Symantec AV pair on the ACS : that?OK. The following softwares are installed on the client PC: - Cisco CTA : ctasetup-win-2.0.1.

  • Photoshop cs3 crashing - out of RAM!?! Help

    Hi, was working on photoshop today with no other programs open apart from the internet, when i attemped to open a file and my tool bar to the left disapeared. I tryed to default the display, at which point it was unresponsive. I forced quit photoshop

  • BAPI_ISUPROFILE_IMPORT

    Hi Gurus;                I am getting an error when i am trying to upload the profile through the bapi 'BAPI_ISUPROFILE_IMPORT'. The error is 'Interval size of the transferred values does not correspond to profile'. Regards.

  • Booting different operating systems off apple USB SuperDrive

    I'm used to booting systems off of dvd's like "ubuntu" "windows" etc on the internal superdrive. and seeing the new i-mac without the internal dvd reader makes me ask if its possible to boot different systems like mentioned above on the apple USB Sup