Tree Level - Link

Hello Everyone,
I have a tree with different levels,
How do you create a link for each level such that when level 1 or level 2 is clicked, it goes to page1 or page 2
and passes the respective Process_ID  to that page.
Thank You for your time, Appreciate your Help
Sam
Apex 3.2
Table Name: Process
Process_ID
Parent_ID
Process_NM
Level_NO
Process_ID        Parent_ID        Process_NM         Level_NO
1                      0        test                     0
2                    1        Etest                1
3                    2        Rtest              2
4                    3        Atest              3
5                    3        Dtest              3
6                    7        Qtest              4
7                    5        Wtest             5
8                    7        Stest              7Under Tree these are the settings:
Tree Type: Dynamic - From SQL Query
Tree Query:
select "PROCESS_ID" id,
"PARENT_ID" pid,
"PROCESS_NM" name,
"PROCESS_NM" link,
null a1,
null a2
from PROCESS
order by parent_id
Link Templates:
Name Link Anchor Tag
href="#LINK#">#NAME# (with the tags <a....)
Name Link Not Anchor Tag
#NAME#
Thanks
Sam

Oops - forgot about the second part of your question - passing process ID to the page:
select "PROCESS_ID" id,
"PARENT_ID" pid,
"PROCESS_NM" name,
case when level_no = 1 then 'f?p=&APP_ID.:1:&SESSION.::::P1_PROCESS_ID:' || process_id
     when level_no = 2 then 'f?p=&APP_ID.:2:&SESSION.::::P2_PROCESS_ID:' || process_id end link,
null a1,
null a2
from PROCESS
order by parent_idHope this helps,
John

Similar Messages

  • Error When using Element level link in Dataset Joins

    Hi All ,
    I am joining two data sets using element level link ,I am getting the following Error message
    ORA-00972: identifier is too long at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:462) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405) at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:931) at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:481) at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:205) at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:548) at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:217) at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:947) at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1283) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1441) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3769) at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3823) at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1671) at oracle.xdo.dataengine.XMLPGEN.processQuery(XMLPGEN.java:1660) at oracle.xdo.dataengine.XMLPGEN.processSQLDataSource(XMLPGEN.java:462) at oracle.xdo.dataengine.XMLPGEN.writeData(XMLPGEN.java:387) at oracle.xdo.dataengine.XMLPGEN.writeGroup(XMLPGEN.java:885) at oracle.xdo.dataengine.XMLPGEN.writeGroup(XMLPGEN.java:906) at oracle.xdo.dataengine.XMLPGEN.processGroup(XMLPGEN.java:846) at oracle.xdo.dataengine.XMLPGEN.processSQLDataSource(XMLPGEN.java:496) at oracle.xdo.dataengine.XMLPGEN.writeData(XMLPGEN.java:387) at oracle.xdo.dataengine.XMLPGEN.writeGroupStructure(XMLPGEN.java:288) at oracle.xdo.dataengine.XMLPGEN.writeXMLDataStructure(XMLPGEN.java:221) at oracle.xdo.dataengine.XMLPGEN.processDataSet(XMLPGEN.java:1575) at oracle.xdo.dataengine.XMLPGEN.processMergedDataSet(XMLPGEN.java:1345) at oracle.xdo.dataengine.DataProcessor.processData(DataProcessor.java:376) at oracle.xdo.servlet.dataengine.DataProcessor.processData(DataProcessor.java:317) at oracle.xdo.servlet.dataengine.DataProcessor.render(DataProcessor.java:671) at oracle.xdo.servlet.ReportModelContextImpl.getReportXMLData(ReportModelContextImpl.java:280) at oracle.xdo.servlet.CoreProcessor.process(CoreProcessor.java:346) at oracle.xdo.servlet.CoreProcessor.generateDocument(CoreProcessor.java:101) at oracle.xdo.servlet.ReportImpl.renderBodyHTTP(ReportImpl.java:1074) at oracle.xdo.servlet.ReportImpl.renderReportBodyHTTP(ReportImpl.java:639) at oracle.xdo.servlet.XDOServlet.writeReport(XDOServlet.java:492) at oracle.xdo.servlet.XDOServlet.writeReport(XDOServlet.java:462) at oracle.xdo.servlet.XDOServlet.doGet(XDOServlet.java:261) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.xdo.servlet.metadata.track.MostRecentFilter.doFilter(MostRecentFilter.java:64) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.xdo.servlet.security.SecurityFilter.doFilter(SecurityFilter.java:125) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.xdo.servlet.init.InitCheckingFilter.doFilter(InitCheckingFilter.java:63) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119) at java.security.AccessController.doPrivileged(Native Method) at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315) at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442) at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103) at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171) at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256) at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)</
    I used alias names for all the columns not to Exceed characters limit of 30 .When i use group level join ,there is no Error .Please help me on this ,I want to use element level link
    Thanks,

    I put in the curly brackets so my formula now reads
    "Total inquiries for " + {CnAttrCat_1.CnAttrCat_1_Description} + ": " + ToText({@InquiryTypeSubtotal})
    Now when I check the formula I get the error message "This field name is not known."
    Alec

  • Tree Level Query

    Dear Sir
    I need a Tree Level Query in looping Condition and examples using Sql Server
    Regards
    Mohamed Usman

    in sql developer like this
    select level, ename ,empno from emp
    start with mgr = 1001
    connect by prior empno=mgr;

  • Content Item Typ: Tree Navigation Link

    Hi,
    I was told that there is one Tree Navigation Link in the content item types. However I can't see it in the page group configuration.
    I am using oracle 9iAS 9.0.2, portal 9.0.2??, JPDK v2 July one.
    By the way, how can I know the portal version? I didn't do the installation. Everything comes with the oracle 9iAS installation. I did upgrade the JPDK.

    There is currently no item type that does a tree-style navigation.
    A new tree-style navigation portlet is coming soon from the Portal Integration Solutions team.
    There are also a couple of navigation portlets available from the Knowledge Exchange. I've tried this one and it works great.
    There are also some great navigation and search extensions available from Oracle Consulting.
    To find the Portal version number, look on the Builder Page, Admin tab, General Settings. Scroll to the bottom of the page.
    Regards,
    Jerry
    PortalPM

  • How to count the tree levels?

    Hi..
    I'm a new memeber here.. and I have a problem :S
    My problem is about counting the maximum number of a tree levels.
    the question was: write a methode that receives a root of a binary tree and returns the maximum number of levels it has.
    I wrote the following methodes:
    public void depth() {
    System.out.print(depthHelper(root));
    private int depthHelper(TreeNode node) {
    int level = 1;
    if (node == null) {
    return 0;
    level = level + depthHelper(node.rightNode);
    return level;
    The problem is that these methodes count levels from one side which is the right side or left side if I wrote "node.leftNode".
    SO, how can I count them from both sides?
    I'll be very glad if you help me.

    It's often best to start with standard recursive tree traversal algoritm,
    private dH(TreeNode node) {
       if (node != null) {
          dH(node.leftNode);
          dH(node.rightNode);
    }You must keep track of the current depth and the maximum depth so far. The current depth is easy. You just increment it each time you go deeper.
    private dH(TreeNode node, int current) {
       if (node != null) {
          dH(node.leftNode, current + 1);
          dH(node.rightNode, current + 1);
    }The maximum depth is global to the tree so you should keep it outside the method. In each recursive step you compare it to the current depth
    int maximum = 0;
    private dH(TreeNode node, int current) {
       if (node != null) {
          if (current > maximum)
             maximum = current;
          dH(node.leftNode, current + 1);
          dH(node.rightNode, current + 1);
    }Now maximum contains the maximum depth.

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

    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 ?

    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.6AFAIK , 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 criteriaThe 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 ?

  • Tree Node Links

    Hello,
    I am trying to configure a Tree in APEX 4.1 and I'm not sure if what I am trying to do is possible. Here is the situation: I work for a university that has the following colleges:
    College of Arts & Communication
    College of Business Administration
    College of Education
    College of Liberal Arts
    College of Professional Studies
    College of Sciences
    Each of the above listed colleges have multiple majors that are unique to that college.
    So my tree uses the college name for the parent node and each of the majors for that college as the child nodes. Each Major has a major code assigned to it, so when a user clicks on a major, a page loads with information about the students in that major. Colleges, however, do not have a major code and so if the user clicks on the college name in the tree, the page loads but has no data. So, what I would like is that if a user clicks on a mjor, the pages loads like currently set up, but if the user clicks on a college name, a different page loads with information about that college.
    So the question is: Is it possible to have one page load, say Page 21, when a major (child node) is selected, and another page, Page 22, when a college (parent node) is selected?
    Thanks,
    Bob

    Yes, that is very much possible to call different urls/pages from different tree nodes. You need to format your query to use independent select statements (for each node) and finally use UNION to form the tree.
    For example, you can do something like this:
    SELECT CASE WHEN connect_by_isleaf = 1 THEN 0
                WHEN level = 1             THEN 1
                ELSE                           -1
           END as status
    ,      level
    ,      name as title
    ,      icon
    ,      id as value
    ,      tip as tooltip
    ,      url as link
    ,      seq as display
    from
    -- select statement for the parent node
    UNION
    -- select statement for the first/immediate child node
    UNION
    -- select statement for the level 2 child
    start with parent is null
    connect by NOCYCLE prior id = parent
    order siblings by displayIn each select statement, you can specify the required link/url.
    I hope this helps.

  • Item level link in PO for items added from individual Shopping carts

    Hi all,
    IF i create a PO in Sourcing using multiple shopping carts,then for each of the item in the PO ,is there any link which has details about the Line item of the SC from which the PO was created?I am looking for some link in the PO(created from multiple carts) at the item level with the Items in the shopping cart.
    E.g. I create PO 100 from cart 10 and Cart 20.
    CArt 10:
    Line item A
    cart 20:
    Line item B
    PO 100:
    Line Item A(1st item)
    Line item B(2nd item)
    For the above example,is there any link in PO 100 for item A in SC 10 and for item B in SC 20?
    Thanks in advance.

    What are you trying to achieve? What other link do you need if you get the item GUID (this is not the shopping cart number!)? The item GUID is a unique number in the SRM system that is only used for that particular item. So there is no need to identify it any further or in any other way?
    So 4 ways to get it:
    1. use the correct tables (CRMD_ORDERAMD_I & BBP_PDIGP using GUID and SRC_GUID from the top of my head).
    2. Use the BBP_PD_PO_ITEMGETDETAIL Function Module (do a search for BBP_PD_PO* in transaction SE37 to find the correct name).
    3. use transaction BBP_PD (only reference)
    4. use the PO transaction in internet explorer and check the preceding shopping carts
    Regards,
    Robin

  • Spry Accordion one level link

    Hi to all,
    I have a small issue with a website using a Spry Accordion Widget to create a collapsible menu. I have several items of navigation, for example:
    Link 1
    Link 1.1
    Link 1.2
    The Accordion works well, but in some level there is only one item, and no subitems.
    Link 2
    Link 3
    When I try to add a hyperlink to that level, nothing happens. I removed the div of the content, leaving only the panel tab, but the spry tries to make the animation to open the content tab, which is no longer there. I only want to add a link in the panel tab to open another page.
    Any suggestions? Newbie here...
    Thanks in advance...

    Accordion are not ment to be used as menu bars. They are ment for hiding / displaying content.
    That is why Spry cancels all "native" events that are fired on the tabs. So the accordion will still
    operate if you changed your markup from divs to <a> elements and <p> tags.
    You can overwrite this behaviour by adding the following attribute on your <a> element that you have
    placed inside the accordion tab:
    onclick="window.location=this.href;"

  • Eliminating Group Tree Level in VS2010

    I need to have a variable number of levels in the group tree in VS2010, a technique I have used in CR for VS2005. I also saw this resolved for someone using VS2008 on thread 1493907 using the same method that I used in 2005. If, at the most detailed level, I group on a formula that I set to return a zero length string, that level still shows up in the tree and causes an error if the user tries to drill down that far.
    The 3 grouping furmulas:
    Group 1 formula
    select {?level}
    case 1 : {XXX.AGENCY_CD}
    case 2 : {XXX.REGION_CD}
    case 3 : {XXX.ORG_CD}
    default: ""
    Group 2 formula
    select {?level}
    case 1 : {XXX.REGION_CD}
    case 2 : {XXX.ORG_CD}
    default: ""
    Group 3 formula
    select {?level}
    case 1 : {XXX.ORG_CD}
    default: ""
    Summary
    If reporting from Level 1, then all levels of the tree are necessary. If reporting at level 4, I hide the group tree, since it is not necessary. If I want to report from level 3 (or 2), 2 (or 1) levels of grouping should be eliminated, but they are not.

    Don
    I set the grouping level to 3 (out of 1,2,3,4). If the level is 4, the tree makes no sense, so I hide it.
    If I run the program from the IDE:
    When I try to drill down in the GroupTree to the level that should not exist, Visual Studio breaks n allInOne.js with the error "Microsoft JScript runtime error: 'txtTooltipLyr' is null or not an object".
    If I view it in the Main Report Preview in the IDE:
    The 2 levels of nodes that should be eliminated are visible, but they do not do anything. The have no text and expanding the lowest level of the tree does nothing.
    If I deploy the web page and run it without using the IDE:
    The 2 levels of nodes that should be eliminated are visible, but they do not do anything. The have no text and expanding the lowest level of the tree does nothing, except that on the browser status bar there is an 'Error on page.' message.
    I have never exported to RPT format. I just tried it and I had to open it with visual studio. It acts just like Main Report Preview described above.
    DebugDiag does not show anything, I am guessing because the IDE is catching the error and nothing is really crashing.
    Chip
    Edited by: sandcrab72 on Feb 22, 2011 9:27 PM

  • Tree expand link problem

    I have a tree which works a treat - in the link I have the following
    'f?p=&APP_ID.:1:&SESSION.::::P1_ID:'||id||':#'||ID LINK,
    so that when the text is clicked, the page loads with the text at the top of the tree region (my tree is several pages high if all nodes are opened).
    However, when I expand a node, using the [+] link, it appears that the link is not using the anchor bookmark above and so if I open one too far down, the region has to be scrolled. Has anyone modified the template to do this please?
    Phil

    Yeah - sorry Scott. It did not work so when I recreated this example for the forum I omitted it.
    This is what I had done for the Unexpanded Parent and the Unexpanded Parent Last respectively... (I'm passing ID to the A1 column too in the TREE query)
    (I've put it into the page for you to see. Email me if you would like the app login details)
    <pre>
    <td><"><img src="#IMAGE_PREFIX#Fndtre03.gif" width="16" height="22" border="0"></a></td>
    <td><a href="#DRILL_DOWN##<span><a name=&A1. />"><img src="#IMAGE_PREFIX#Fndtre02.gif" width="16" height="22" border="0"></a></td>
    </pre>
    Scott I used pre tags but the above seems to have been stipped out anyway :(
    Message was edited by:
    Phil UK

  • ADF Tree Command Link + Content Menu

    Hi,
    I am trying to build a tree, in which the nodes should have a command link and a context menu enabled. Using JDeveloper 11.1.1.6.0, however the context menu is not showing up, if the command link is enable for a particular node. If the command link option is not set for a node, then the menu option does shows up. Below is what my code looks like. Has anyone faced a similar issue/know of a solution?
    My Code is something like -
    *<f:facet name="contextMenu">*
    <af:popup id="p1" contentDelivery="lazyUncached">
    <af:menu text="Location Menu" id="m31"
    visible="#{pageFlowScope.TreeData.showLocationMenu}" contentDelivery="immediate">
    <af:commandMenuItem text="Add new Department"
    id="cmi2" partialSubmit="true" immediate="true"
    actionListener="#{pageFlowScope.TreeData.createDepartment}">
    <af:setPropertyListener from="#{node.viewType}"
    to="#{pageFlowScope.formView}"
    type="action"/>
    <f:attribute name="node" value="#{node}"/>
    </af:commandMenuItem>
    </af:menu>
    </facet>     
    <f:facet name="nodeStamp">
    *<af:commandLink text="#{node.key} #{node.text}"*
    *action="#{pageFlowScope.DynamicRegionBean.getDep}" id="cl1" partialSubmit="true" immediate="true"/>*
    *</f:facet>*
    Thanks
    Sachin

    Hi Timo,
    Yeah... adding an output text, shows the context menu on the text, however I was looking for something like one 'text' rendered and it doing the option of both.
    Something like what we can do for any hyper link, if click on it, it opens that link or else if I right click on the link, it gives me options like - Open in new Tab/Window etc.
    Any suggestions??
    Thanks
    Sachin

  • Tree node link using htmlb

    Hi all
    Do any one give me the code to make the object in the tree node as link to navigate to another page,
    Note:Onmouseover alone the object gets the link and I need to get the hand symbol
    reg
    balaji

    Hi,
    In the below code i need to make Course type 1A, Course type 2A, Course type 3A as a link to navigate to other pages. Please guide me reagarding this,
    <hbj:treeNode id="e_root" text="Desk" isOpen="true" >
                 <hbj:treeNode id="e_cga"   text="Course group A" isOpen="true" tooltip="Course group A">
                 <hbj:treeNode id="e_cta"   text="Course type 1A" tooltip="Course type 1A "/>
                 <hbj:treeNode id="e_ctb"   text="Course type 2A" tooltip="Course type 2A "/>
                 <hbj:treeNode id="e_ctc"   text="Course type 3A" tooltip="Course type 3A "/>
                 </hbj:treeNode>
                   <hbj:treeNode  id="e_cgb"   text="Course group B" isOpen="true"  tooltip="Course group B" >
                   <hbj:treeNode  id="e_ct1"   text="Course type 1B" tooltip="Course type 1B " />
                   <hbj:treeNode  id="e_ct2"   text="Course type 2B" tooltip="Course type 2B " />
                   <hbj:treeNode  id="e_ct3"   text="Course type 3B" tooltip="Course type 3B "/>
                   </hbj:treeNode>
                   </hbj:treeNode>
    Waiting for replies,

  • Tree view link to forms

    In the explorer.swf tree demo the link from the tree items on
    the left side fo the hdividebox goes to a text label on the right
    side of the hdividebox. If you want to display a form instead of
    the text label of the tree item, what changes will need to be
    made?

    You'll need to reference the correct controls by id. Just try
    it. Post if you have a specific question.
    Tracy

  • Binary tree    (level by level insert)

    Hello,
    I already posted this artivle in the Forum "Java Programming" because I'm new to the Forum and didn't see the Algorithms part.. Sorry for the double posting.
    I'm trying to program a binary tree. It's totally clear for me to insert new (Integer) Values in an ordinary binary tree.
    I simply have to check if the root is equal (--> ready) smaller or larger than the value. I repeat this until I reached a leaf and then I insert a new node.
    BUT:
    My teacher gave me following problem: Inserting values level by level. The first element is the root, the leftson of the root is nuber2 the rightson of the root is number3
    The leftson of root's leftson is number4, the rightson of root's leftson is number 5, the leftson of root's rightson is number 6 and so on.
    I have NO idea how to program that.
    For example: the 23rd element is in the tree: left, right, right, right, whilst the 24th element is right, left, left, left.
    I cannot find a recursive structure, that solves the problem.
    Perhaps YOU can save me from gettin' mad ;o)
    I really hope so.

    But can you think of a recursive code to solve the problem????????Ok, here's another hint -- take that node 23 again as an example. If you write out this number in binary (10111) and skip the leftmost 1 in this pattern (x0111), start reading from left to right, starting at the right of th 'x'. 0 denotes left, 1 denotes right. Does that ring a bell?
    Something like the following (pseudo code) should come up --
    insert(Node node, int val, int pattern, int bitmask) {
       if (bitmask == 1)                  // we have to insert now
          if ((pattern & bitmask) == 1)   // insert right
             node.right= new Node(val);
          else                            // insert left
             node.left= new Node(val);
       else if ((pattern & bitmask) == 1) // move right
          insert(Node.right, val, pattern, bitmask >> 1);
       else                               // move left
          insert(Node.left, val, pattern, bitmask >> 1);
    }Some bits and pieces are left as an exercise ;-)
    kind regards,
    Jos

Maybe you are looking for

  • Mail server setup

    I just got a FQDN from godaddy and want to add it to DNS As a mail server. Do I create a new zone and set up mail as that as a naneserver? I want to have my Xserve as a mailserver not restrcted to the local network. Thanks Message was edited by: macp

  • Bridge opens file in Camera Raw 7.0.  How can I open new version/beta of ACR?

    Just installed CS6 beta and when trying to open files from Bridge into ACR, I am taken to Camera Raw 7.0.  Afraid to uninstall all CS5 files until full version of CS6 is released.  Help?

  • Remove "Calculated Profit *ERGEBNNIS*" from Customized PCA Drilldown Report

    I create PCA Drilldown Report by copy from standard form &standard report "0SAPBSPL-03" or T-Code "S_E38_98000088". When I execute this standard report with Financial Statement Version, it's OK. There is no item of Calculated Profit (Account No. ERGE

  • Macbook Pro crashes randomly after Maverick's Upgrade

    I have had my Macbook Pro since 2011 and it very rarely crashed. Since I upgraded to Mavericks, I've had random crashes happen quite a bit more frequently. I have had 3 crashes in 2 days.  Most of the work I do is within Google Chrome, but I usually

  • Nforce drivers which one ? nvidia or msi ?

    i need to know which ones gives you max performance ? either nvidia ones or msi's ! .. i had msi nforce3 drivers so i uninstalled them and installed nvidia's ones , i also have a nvidia gfx card , so after installing nvidia nforce drivers i was getti