Problem with tree view

Hello and good morning,
i´ve got a problem with a tree view in one of our web dynpro applications.
The tree view act´s as a menu. For example:
the highest element is: personal
If you open personal you see:
recruiting
payment
and so on...
Our Problem is...
You can open the tree element by clicking on the little box left from the tree-element text.But we want that the tree-element is also "line-sensitieve". This means, the next elements should not only appear by clicking the box, also by clicking simply the line.
Is this possible.
PS: Sorry for this bad application, but i don´t know how to explain it better

method ONACTIONTOGGLE .
  data:
    Elem_Context                        type ref to If_Wd_Context_Element,
    Stru_Context                        type If_Menu_Tree=>Element_Context ,
    Item_IS_OPEN                        like Stru_Context-IS_OPEN.
data parent_key type string.
    data children_loaded type wdy_boolean.
data x_node type ref to IF_WD_CONTEXT_NODE.
* get context via lead selection
  Elem_Context = wd_Context->get_Element(  ).
* get single attribute
  Elem_Context->get_Attribute(
    exporting
      Name =  `IS_OPEN`
    importing
      Value = Item_Is_Open ).
  if Item_Is_Open = abap_true.
    Item_Is_Open = abap_false.
  else.
    Item_Is_Open = abap_true.
  endif.
  Elem_Context->set_Attribute(
  exporting
    Name =  `IS_OPEN`
    Value = Item_Is_Open ).
endmethod.

Similar Messages

  • [Win/CS3] Problem with tree view nodes display In Release Version of InDesign

    b [Win/CS3]
    Hi All,
    I am Facing a problem from last few days.I have a dialog on which i have a treeview ListBox.I am filling this listBox dynamically.On a Button click Event.
    My requirement is to show Some text value on the node and Index value on the back end.So When i select String1 the index1 should be Selected.
    b This Listbox is working fine ON Debug Version. But Crashing On Release Version.That seems Strange to me..........?????????
    b in DialogObserver::Update on button click event
    NodeID node = IDCGridNodeID::Create(IndexX);
    treeMgr->NodeAdded(node);
    b and in TreeviewMgr::ApplyDataToWidget
    TreeNodePtr<IDCGridNodeID> nodeID(node);
    PMString IndexNo= nodeID->GetName();
    I am going to database and retrieving string value according to that
    IndexNo.
    WCHAR Buf[200];// this contains value retrieve from database
    Then i am converting WCHAR[] to CHAR[] BY using
    size_t origsize = wcslen(Buf) + 1 ;
    const size_t newsize = 100;
    size_t convertedChars = 0;
    char nstring[newsize];
    wcstombs_s (&convertedChars, nstring, origsize, buf, _TRUNCATE);
    PMString StringToDisplay(nstring);
    //Till here its working fine
    But when i am setting this value as Node name
    style.Translate();
    setNodeName( widgetList, StringToDisplay, kIDCTVTextWidgetID );
    and function return kTrue; statement executed The application is crashing.
    With error showing
    b INdesign Encountered a problem Needs to close.
    I Am not able to find out why this is not working on Release while it is working fine on debug version..???????????????????
    Is I am missing or Made some changes For release version..????
    Thanks,

    Hi Michael,
    Thanks for your reply.
    The lines
    NodeID node = IDCGridNodeID::Create(IndexX);
    treeMgr->NodeAdded(node);
    are working fine for Both Debug N Release version.The Application Is crashing In tree view manager class as i explained.
    while it works fine without having even a single warning in debug version.
    I read the document and i find out if i want to add node in treeview i have to call
    treeMgr->NodeAdded(node);
    which will call manager
    b and in TreeviewMgr::ApplyDataToWidget
    i am getting my node name as
    TreeNodePtr<IDCGridNodeID> nodeID(node);
    PMString IndexNo= nodeID->GetName();
    I don't think that something is wrong in this but i am not sure becoz i am new in indesign development.
    for adding nodes i referred the SDK examples.I found the same code for adding.

  • Problem with tree view alignment

    http://tinypic.com/r/34o1wjl/6
    please view the link !!
    i want the tree for the Finished product just below the Raw Material, where as i am not able to achieve it. The raw material gets place in a separate box and finished in another.
    the code for the above is :
    public VBox addVBox()
    VBox vbox = new VBox();
    vbox.setPadding(new Insets(10)); // Set all sides to 10
    vbox.setSpacing(8); // Gap between nodes
    TreeItem<String> inventoryRM = new TreeItem<String> ("Raw Materials");
    inventoryRM.setExpanded(false);
    TreeItem<String> itemRM1 = new TreeItem<String> ("Add Raw Material");
    inventoryRM.getChildren().add(itemRM1);
    TreeItem<String> itemRM2 = new TreeItem<String> ("Edit Raw Material");
    inventoryRM.getChildren().add(itemRM2);
    TreeItem<String> itemRM3 = new TreeItem<String> ("Delete Raw Material");
    inventoryRM.getChildren().add(itemRM3);
    TreeItem<String> inventoryFinished = new TreeItem<String> ("Finished Product");
    inventoryFinished.setExpanded(false);
    TreeItem<String> itemF1 = new TreeItem<String> ("Add");
    inventoryFinished.getChildren().add(itemF1);
    TreeView<String> treeRM = new TreeView<String> (inventoryRM);
    TreeView<String> treeFinished = new TreeView<String> (inventoryFinished);
    vbox.getChildren().addAll(treeRM,treeFinished);
    return vbox;
    }

    If I understand correctly, you're looking for a single tree with two top-level nodes "Raw Materials" and "Finished Product".
    You can achieve this with
    public VBox addVBox()
      VBox vbox = new VBox();
      vbox.setPadding(new Insets(10)); // Set all sides to 10
      vbox.setSpacing(8); // Gap between nodes
      TreeItem<String> inventoryRM = new TreeItem<String> ("Raw Materials");
      inventoryRM.setExpanded(false);
      TreeItem<String> itemRM1 = new TreeItem<String> ("Add Raw Material");
      inventoryRM.getChildren().add(itemRM1);
      TreeItem<String> itemRM2 = new TreeItem<String> ("Edit Raw Material");
      inventoryRM.getChildren().add(itemRM2);
      TreeItem<String> itemRM3 = new TreeItem<String> ("Delete Raw Material");
      inventoryRM.getChildren().add(itemRM3);
      TreeItem<String> inventoryFinished = new TreeItem<String> ("Finished Product");
      inventoryFinished.setExpanded(false);
      TreeItem<String> itemF1 = new TreeItem<String> ("Add");
      inventoryFinished.getChildren().add(itemF1);
      TreeItem<String> rootNode = new TreeItem<String>("");
      rootNode.getChildren().addAll(inventoryRM, inventoryFinished);
      TreeView<String> tree = new TreeView<String> (rootNode);
      tree.setShowRoot(false);
      vbox.getChildren().addAll(tree);
      return vbox;
    }

  • Problems with Tree View

    I am using Forms 6 to display a hierarchical tree strucure in a departmental application. I am able to use it for displaying the hierarchy but unable to do anything programatically with the tree. Could somebody help me please, with some insight - which would be much appreciated. Thanks in advance.

    Hi Sumer!
    U can do any thing with the tree programatically.
    Tell me which tree u r using if it is activex provided by forms.
    U can find all the methods and functions in the forms help search for Heirarchical trees topic.
    Even u r facing any problem write me I will get u the solution.
    Mayank Sharma
    [email protected]

  • Table with tree view on master column

    Hi,
    I'm trying to generate a table with tree view on the master column and I get the table values from an RFC.
    The problem is that I need to control some properties like "expanded" or "isLeaf" and I can't add the value attributes to the model node to control the rows.
    Any ideia on how to overcome this (what i  think is a) problem?
    Thanks for the help.
    Pedro Barbosa

    Hi Subramanian,
    Maybe I didn't explain myself right. I also followed that tutorial with success but in this case i have on my custom controller:
    -MyNode (model node)
      - Output
        - MyTable
          - attribute 1 (model attribute)
    In my context/view controller the only way i can map that node is by using a model node referecing "MyTable" but this way i can't add any of my attributes to same level of the attributes (is that the ideia right?).
    I also tried to recreate the structure in the view with value nodes and value attributes with the same type as the model attributes and then bind them but i always get "Incompatible context element type".
    Am i missing something?
    Pedro Barbosa

  • Problem with a view in XK01 transaction

    Hi All,
    I am working on upload conversion for Vendor Master. While doing conversion, i am getting a problem with a Contact person view in XK01 transaction. In contact person view the telephone field column sometimes allowing to add data ,sometimes it's not allowing data which results an error in conversion program saying that the telephone field in not an input field. I don't know why the view is showing the telephone field like that.
    Can any one suggest the solution for this problem. I know this is configuration problem with a view but i posted in ABAP forums.
    Thanks

    Hi Ben,
    I assume that you are writing a BDC program to upload contact person information. If so, you are trying to populate a table control here. Please check to see if you are calculating the index to assign values to the correct rows.
    if you are calculating index in your program then i think it should be configuration problem as you said.
    Thanks,
    Ganesh.

  • Problem with HTML viewer

    Dear All ,
    I am facing a problem with HTML Viewer . My senario is as follows :
    1. I have created one HTML page . On that page there are 4 Images
    2. I imported that HTML page in SAP with the help of transaction SMW0
    3. I Called that HTML page in my ABAP program using the method "load_html_document" of class cl_gui_html_viewer
    4. This is happening perfectly ok on the machine on which all this developement was done.
    But the issue is when I execute my ABAP program on a different machine , those Images on that HTML page are not displaying.
    Can you please guide me how to remove that machine dependancy?
    Regards,
    Nikhil

    Hi Nikhil,
    Please check if the image is properly imported properly. Also check if there is any option which you might have forgotten while imported like dependeency.
    Regards
    Abhii...

  • Issue with Tree view

    Hello experts,
    I am facing a very strange issue with tree view.
    I have created a custom component with a tree view. All data are coming in the tree view. But the strange thing is that the data is not getting displayed on the screen.
    I am sure about the data because, when I am selecting a line from the tree, the data from that line is coming to the main screen.
    Please help!!
    Regards
    Debolina

    Hi experts...
    Any pointers to this issue???
    Please help!
    Regards,
    Debolina

  • SQL editor with tree view

    We are working on some extraordiary long SQL stored procedure. Due to the shear size and IF/ELSE nesting it is very tedious to understand the logic .
    What I am looking for is an SQL editor with tree view, where we can see IF/ ELSE, LOOP etc block as nodes. For example expand a node and see all blcoks of code within it.
    + IF block 1
    expand---
    -IF blcok 1
    +IF block 1.1
    +IF block 1.2
    further expand
    -IF blcok 1
    +IF block 1.1
    -IF block 1.2
    IF block 1.2.1

    Do some Google searches for a text editor that supports "folding".

  • Problem with Materialized Views after an export

    Hi @ everybody,
    At an Oracle 11g R2 (11.2.0.3.0) instance, all actual CPU's/SPU's are installed, on a Red Hat 6 Machine i have a problem with Materialized Views from a schema, which i have exportet from an old database machine on Oracle 10g (10.2.0.1.0) to the new machine.
    I've exportet with the old exp and imported with imp, because i know, that i get some strange errors because of the materialized views when i'm using the new expdp and impdp tools.
    At the old machine the materialized views are so programmed, that they get an update of data at a defined time like this:
    START WITH TRUNC(SYSDATE) + 21/24
          NEXT SYSDATE+1
    ...But after the export this "update function" of the materialized view is not available. So i have deleted that views and recreated them with the START WITH parameters. So now they are running.
    But why do i have this problem?
    Is this "START WITH" somewhere written as a job or so in, for example, DBMS_SCHEDULER or something else? So i had forgotten to export these jobs or where is that defined?
    Is this a bug?
    Thanks for answers and help!
    Best regards,
    David

    I can't remember the error of expdp/impdp. That is some days ago, i have to rebuild this.
    I think in my scenario for the import i don't need the TABLE_EXISTS_ACTION, because by importing at the new server i've just createt the naked tablespace for the data and the users, not more. So he didn't has something to overwrite.
    And i have to tell you: i'm just the dbA. The desining of the tables and materialized views is many years ago by installing the old server. I'm just to young in my company to know about the design of the instance and why it was designed so.
    Anyway: my problem is, that after the import of the schemas to a new server the "START WITH" option in the materialized views is not there anymore and i just want to why so i can think about a solution for that and create it with the database designers of my company.
    EDIT: And here are the SQL Statements for creating the Materialized Views:
    First, at the OLD Server (Oracle 10g 10.2.0.1.0)
      CREATE MATERIALIZED VIEW "DUPONT_CCG2_P"."PR_PRODUCT_ITEMS"
      ORGANIZATION HEAP PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "DUPONT_14523"
      BUILD IMMEDIATE
      USING INDEX
      REFRESH COMPLETE ON DEMAND START WITH sysdate+0 NEXT SYSDATE+1
      USING DEFAULT LOCAL ROLLBACK SEGMENT
      DISABLE QUERY REWRITE
      AS (SELECT DISTINCT
          PR_CUSTOMER_MASTER_DATA.CLIENT_ID,
          PR_CUSTOMER_MASTER_DATA.ILN_USER,
          PR_ARTICLE.EAN,
          PR_ARTICLE.CODE,
          PR_USED_ARTICLE_TEXT.ARTICLE_TEXT,
          PR_USED_ARTICLE_TEXT.LANG_CODE,
          PR_ARTICLE.SUP_ITEM_NO,
          PR_ARTICLE.OLD_ITEM_NO,
          PR_COMPANY_ITEM_MATCH.ITEM_BY_NO,
          PR_COMPANY_ITEM_MATCH.UOM_UNIT,
          PR_COMPANY_ITEM_MATCH.PRICE_UOM,
          PR_COMPANY_ITEM_MATCH.PRICE,
          PR_COMPANY_ITEM_MATCH.CURRENCY,
          PR_COMPANY_ITEM_MATCH.PRICE_QTY,
          PR_COMPANY_ITEM_MATCH.SALES_UNIT,
          PR_COMPANY_ITEM_MATCH.START_DATE,
          PR_COMPANY_ITEM_MATCH.END_DATE,
          PR_ARTICLE.UPDATED_AT
            FROM PR_ARTICLE, PR_COMPANY_ITEM_MATCH, PR_USED_ARTICLE_TEXT, PR_CUSTOMER_MASTER_DATA, PR_ADDRESS
            WHERE PR_ADDRESS.ORDER_TYPE='REP'
          AND PR_CUSTOMER_MASTER_DATA.ILN_USER=PR_ADDRESS.ILN_USER
          AND PR_COMPANY_ITEM_MATCH.ILN_USER=PR_ADDRESS.ILN_LINK
          AND PR_CUSTOMER_MASTER_DATA.SALES_ORG=PR_COMPANY_ITEM_MATCH.SALES_ORG
          AND PR_CUSTOMER_MASTER_DATA.CLIENT_ID=PR_COMPANY_ITEM_MATCH.CLIENT_ID
          AND PR_CUSTOMER_MASTER_DATA.CLIENT_ID=PR_ADDRESS.CLIENT_ID
          AND PR_ARTICLE.SUP_ITEM_NO=PR_COMPANY_ITEM_MATCH.SUP_ITEM_NO
          AND PR_COMPANY_ITEM_MATCH.SALES_ORG=PR_USED_ARTICLE_TEXT.SALES_ORG
          AND PR_ARTICLE.SUP_ITEM_NO=PR_USED_ARTICLE_TEXT.SUP_ITEM_NO
          AND PR_CUSTOMER_MASTER_DATA.LANG_CODE=PR_USED_ARTICLE_TEXT.LANG_CODE
          AND ( PR_COMPANY_ITEM_MATCH.END_DATE IS NULL OR to_date(PR_COMPANY_ITEM_MATCH.END_DATE,'YYYYMMDD') - sysdate > 0)
          AND ( PR_COMPANY_ITEM_MATCH.START_DATE IS NULL OR sysdate - to_date(PR_COMPANY_ITEM_MATCH.START_DATE,'YYYYMMDD') > 0)
    )And here the at the NEW Server (Oracle 11g R2 11.2.0.3.0)
      CREATE MATERIALIZED VIEW "DUPONT_CCG2_P"."PR_PRODUCT_ITEMS" ("CLIENT_ID", "ILN_USER", "EAN", "CODE", "ARTICLE_TEXT", "LANG_CODE", "LANR", "OLD_LANR", "ITEM_BY_NO", "UOM_UNIT", "PRICE_UOM", "PRICE", "CURRENCY", "PRICE_QTY", "SALES_UNIT", "START_DATE", "END_DATE", "UPDATED_AT")
      ORGANIZATION HEAP PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
    NOCOMPRESS LOGGING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
      BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
      TABLESPACE "DUPONT_14523"
      BUILD IMMEDIATE
      USING INDEX
      REFRESH COMPLETE ON DEMAND START WITH sysdate+0 NEXT SYSDATE+1
      USING DEFAULT LOCAL ROLLBACK SEGMENT
      USING ENFORCED CONSTRAINTS DISABLE QUERY REWRITE
      AS (SELECT DISTINCT
          PR_CUSTOMER_MASTER_DATA.CLIENT_ID,
          PR_CUSTOMER_MASTER_DATA.ILN_USER,
          PR_ARTICLE.EAN,
          PR_ARTICLE.CODE,
          PR_USED_ARTICLE_TEXT.ARTICLE_TEXT,
          PR_USED_ARTICLE_TEXT.LANG_CODE,
          PR_ARTICLE.SUP_ITEM_NO,
          PR_ARTICLE.OLD_ITEM_NO,
          PR_COMPANY_ITEM_MATCH.ITEM_BY_NO,
          PR_COMPANY_ITEM_MATCH.UOM_UNIT,
          PR_COMPANY_ITEM_MATCH.PRICE_UOM,
          PR_COMPANY_ITEM_MATCH.PRICE,
          PR_COMPANY_ITEM_MATCH.CURRENCY,
          PR_COMPANY_ITEM_MATCH.PRICE_QTY,
          PR_COMPANY_ITEM_MATCH.SALES_UNIT,
          PR_COMPANY_ITEM_MATCH.START_DATE,
          PR_COMPANY_ITEM_MATCH.END_DATE,
          PR_ARTICLE.UPDATED_AT
            FROM PR_ARTICLE, PR_COMPANY_ITEM_MATCH, PR_USED_ARTICLE_TEXT, PR_CUSTOMER_MASTER_DATA, PR_ADDRESS
            WHERE PR_ADDRESS.ORDER_TYPE='REP'
          AND PR_CUSTOMER_MASTER_DATA.ILN_USER=PR_ADDRESS.ILN_USER
          AND PR_COMPANY_ITEM_MATCH.ILN_USER=PR_ADDRESS.ILN_LINK
          AND PR_CUSTOMER_MASTER_DATA.SALES_ORG=PR_COMPANY_ITEM_MATCH.SALES_ORG
          AND PR_CUSTOMER_MASTER_DATA.CLIENT_ID=PR_COMPANY_ITEM_MATCH.CLIENT_ID
          AND PR_CUSTOMER_MASTER_DATA.CLIENT_ID=PR_ADDRESS.CLIENT_ID
          AND PR_ARTICLE.SUP_ITEM_NO=PR_COMPANY_ITEM_MATCH.SUP_ITEM_NO
          AND PR_COMPANY_ITEM_MATCH.SALES_ORG=PR_USED_ARTICLE_TEXT.SALES_ORG
          AND PR_ARTICLE.SUP_ITEM_NO=PR_USED_ARTICLE_TEXT.SUP_ITEM_NO
          AND PR_CUSTOMER_MASTER_DATA.LANG_CODE=PR_USED_ARTICLE_TEXT.LANG_CODE
          AND ( PR_COMPANY_ITEM_MATCH.END_DATE IS NULL OR to_date(PR_COMPANY_ITEM_MATCH.END_DATE,'YYYYMMDD') - sysdate > 0)
          AND ( PR_COMPANY_ITEM_MATCH.START_DATE IS NULL OR sysdate - to_date(PR_COMPANY_ITEM_MATCH.START_DATE,'YYYYMMDD') > 0)
    )The own differences i can see is at the "header". In the new one is the NOCOMPRESS LOGGING Option and in the first line the code has the columns diretcly defined.
    But, i think, for my problem this line is determining:
      REFRESH COMPLETE ON DEMAND START WITH sysdate+0 NEXT SYSDATE+1And this line is the same at both server.
    Edited by: David_Pasternak on 12.04.2013 00:06

  • Problems with Street View

    new street view from new google map release shows black screen

    I'm having similar problems with Street View on openSUSE. For the time being you can try to switch back to the classic Google Maps.
    https://support.google.com/maps/answer/3045828?hl=en&ref_topic=3093612

  • Problem with trees(Duplication of the parent node in creation of  children)

    Hi guys i am experiencing a slight problem with the creation of trees.Here is a clear explanation of my program.I created a program that generates edges from a set of datapoints then use each and every edge that is generated to create multiple trees with the edge as the rootnode for each and every tree.Everything up to so far everything went well but the problem comes when i want the program to pick every single tree and traverse through the set of generated edges to create the children of a tree.What it does at the moment for each tree is returning the a duplication of the parent node as the child nodes and that is a problem.Can anyone related with this problem help.Your help will be appreciated.
    The code
    TreeNode class
    package SPO;
    import java.util.*;
    public class TreeNode
            Edge edge;
            TreeNode node;
         Vector childrens = new Vector();
            public TreeNode(Edge edge)
                    this.edge = edge;
            public synchronized  void insert(Edge edge)
                    if(edge.fromNode == this.edge.toNode)
                            if(node == null )
                                    node = new TreeNode(edge);
                                    childrens.add(node);
                            else
                        node.insert(edge);
                                    childrens.add(node);
    Tree class
    package SPO;
    import java.util.*;
    public class Tree
            TreeNode rootNode;
         public Tree()
                    rootNode = null;
            public Tree[]  createTrees(Vector initTrees,Vector edges)
                   Tree [] trees =  new Tree[initTrees.size()];
                   for(int c = 0;c < trees.length;c++)
                      trees[c] = (Tree)initTrees.elementAt(c);     
                   for(int i = 0;i < trees.length;i++)
                            for(int x = 0;x < edges.size();x++)
                                    Vector temp = (Vector)edges.elementAt(x);
                                    for(int y = 0;y < temp.size();y++)
                                           trees.insertNode((Edge)temp.elementAt(y));
    return trees;
    public void printTree(Tree tree)
    System.out.print("("+tree.rootNode.edge.fromNode.getObjName()+","+tree.rootNode.edge.toNode.getObjName()+")");
    Vector siblings = tree.rootNode.childrens;
    for(int i = 0; i < siblings.size();i++)
    TreeNode node = (TreeNode)siblings.elementAt(i);
    System.out.print("("+node.edge.fromNode.getObjName()+","+node.edge.toNode.getObjName()+")");
    System.out.println();
    public Vector initializeTrees(Vector edges)
    Vector trees = new Vector();
    for(int i = 0;i < edges.size();i++)
    Vector temp = (Vector)edges.elementAt(i);
    for(int j = 0;j < temp.size();j++)
    Tree tree = new Tree();
    tree.insertNode((Edge)temp.elementAt(j));
    trees.add(tree);
    return trees;
    public synchronized void insertNode(Edge edge)
    if(rootNode == null)
    rootNode = new TreeNode(edge);
    else
    rootNode.insert(edge);
    EdgeGenerator class
    package SPO;
    import java.util.*;
    import k_means.*;
    public class EdgeGenerator
         public EdgeGenerator()
    public Vector createEdges(Vector dataPoints)
    //OrderPair orderPair = new OrderPair();
    Vector edges = new Vector();
    for(int i = 0;i < dataPoints.size()-1 ;i++)
    Vector temp = new Vector();
    for(int j = i+1;j < dataPoints.size();j++)
    //Create an order of edges
    Edge edge = new Edge((DataPoint)dataPoints.elementAt(i),(DataPoint)dataPoints.elementAt(j));
    temp.add(edge);
    edges.add(temp);
    return edges;
    Edge class
    package SPO;
    import k_means.*;
    public class Edge
    public DataPoint toNode;
    public DataPoint fromNode;
    public Edge(DataPoint x,DataPoint y)
    if (x.getX() > y.getX())
    this.fromNode = x;
    this.toNode = y;
    else
    this.fromNode=y;
    this.toNode = x;
    Entry Point
    package SPO;
    import java.util.*;
    import k_means.*;
    public class Tester {
         public static void main(String[] args)
              Vector dataPoints = new Vector();
              dataPoints.add(new DataPoint(140, "Orange"));
              dataPoints.add(new DataPoint(114.2, "Lemmon"));
              dataPoints.add(new DataPoint(111.5, "Coke"));
              dataPoints.add(new DataPoint(104.6, "Pine apple"));
              dataPoints.add(new DataPoint(94.1, "W grape"));
              dataPoints.add(new DataPoint(85.2, "Appletizer"));
              dataPoints.add(new DataPoint(84.8, "R Grape"));
              dataPoints.add(new DataPoint(74.2, "Sprite"));
              dataPoints.add(new DataPoint(69.2, "Granadilla"));
              dataPoints.add(new DataPoint(59, "Strawbery"));
              dataPoints.add(new DataPoint(45.5, "Stone"));
              dataPoints.add(new DataPoint(36.3, "Yam"));
              dataPoints.add(new DataPoint(27, "Cocoa"));
              dataPoints.add(new DataPoint(13.8, "Pawpaw"));
    EdgeGenerator eg = new EdgeGenerator();
    Vector edges = eg.createEdges(dataPoints);
    Tree treeMaker = new Tree();
    Vector partialTrees = treeMaker.initializeTrees(edges);
    Tree [] trees = treeMaker.createTrees(partialTrees,edges);
    for(int i = 0;i < trees.length;i++)
    treeMaker.printTree(trees[i]);
    The program output
    Each and every "@" symbol represents the start of a tree
    @(Orange,Lemmon)(Lemmon,Coke)(Lemmon,Coke)(Lemmon,Coke)(Lemmon,Coke)(Lemmon,Coke)(Lemmon,Coke)(Lemmon,Coke)(Lemmon,Coke)(Lemmon,Coke)(Lemmon,Coke)(Lemmon,Coke)(Lemmon,Coke)
    @(Orange,Coke)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)
    @(Orange,Pine apple)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)
    @(Orange,W grape)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)
    @(Orange,Appletizer)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)
    @(Orange,R Grape)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)
    @(Orange,Sprite)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)
    @(Orange,Granadilla)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)
    @(Orange,Strawbery)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)
    @(Orange,Stone)(Stone,Yam)(Stone,Yam)(Stone,Yam)
    @(Orange,Yam)(Yam,Cocoa)(Yam,Cocoa)
    @(Orange,Cocoa)(Cocoa,Pawpaw)
    @(Orange,Pawpaw)
    @(Lemmon,Coke)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)(Coke,Pine apple)
    @(Lemmon,Pine apple)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)
    @(Lemmon,W grape)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)
    @(Lemmon,Appletizer)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)
    @(Lemmon,R Grape)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)
    @(Lemmon,Sprite)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)
    @(Lemmon,Granadilla)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)
    @(Lemmon,Strawbery)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)
    @(Lemmon,Stone)(Stone,Yam)(Stone,Yam)(Stone,Yam)
    @(Lemmon,Yam)(Yam,Cocoa)(Yam,Cocoa)
    @(Lemmon,Cocoa)(Cocoa,Pawpaw)
    @(Lemmon,Pawpaw)
    @(Coke,Pine apple)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)(Pine apple,W grape)
    @(Coke,W grape)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)
    @(Coke,Appletizer)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)
    @(Coke,R Grape)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)
    @(Coke,Sprite)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)
    @(Coke,Granadilla)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)
    @(Coke,Strawbery)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)
    @(Coke,Stone)(Stone,Yam)(Stone,Yam)(Stone,Yam)
    @(Coke,Yam)(Yam,Cocoa)(Yam,Cocoa)
    @(Coke,Cocoa)(Cocoa,Pawpaw)
    @(Coke,Pawpaw)
    @(Pine apple,W grape)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)(W grape,Appletizer)
    @(Pine apple,Appletizer)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)
    @(Pine apple,R Grape)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)
    @(Pine apple,Sprite)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)
    @(Pine apple,Granadilla)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)
    @(Pine apple,Strawbery)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)
    @(Pine apple,Stone)(Stone,Yam)(Stone,Yam)(Stone,Yam)
    @(Pine apple,Yam)(Yam,Cocoa)(Yam,Cocoa)
    @(Pine apple,Cocoa)(Cocoa,Pawpaw)
    @(Pine apple,Pawpaw)
    @(W grape,Appletizer)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)(Appletizer,R Grape)
    @(W grape,R Grape)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)
    @(W grape,Sprite)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)
    @(W grape,Granadilla)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)
    @(W grape,Strawbery)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)
    @(W grape,Stone)(Stone,Yam)(Stone,Yam)(Stone,Yam)
    @(W grape,Yam)(Yam,Cocoa)(Yam,Cocoa)
    @(W grape,Cocoa)(Cocoa,Pawpaw)
    @(W grape,Pawpaw)
    @(Appletizer,R Grape)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)(R Grape,Sprite)
    @(Appletizer,Sprite)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)
    @(Appletizer,Granadilla)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)
    @(Appletizer,Strawbery)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)
    @(Appletizer,Stone)(Stone,Yam)(Stone,Yam)(Stone,Yam)
    @(Appletizer,Yam)(Yam,Cocoa)(Yam,Cocoa)
    @(Appletizer,Cocoa)(Cocoa,Pawpaw)
    @(Appletizer,Pawpaw)
    @(R Grape,Sprite)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)(Sprite,Granadilla)
    @(R Grape,Granadilla)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)
    @(R Grape,Strawbery)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)
    @(R Grape,Stone)(Stone,Yam)(Stone,Yam)(Stone,Yam)
    @(R Grape,Yam)(Yam,Cocoa)(Yam,Cocoa)
    @(R Grape,Cocoa)(Cocoa,Pawpaw)
    @(R Grape,Pawpaw)
    @(Sprite,Granadilla)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)(Granadilla,Strawbery)
    @(Sprite,Strawbery)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)
    @(Sprite,Stone)(Stone,Yam)(Stone,Yam)(Stone,Yam)
    @(Sprite,Yam)(Yam,Cocoa)(Yam,Cocoa)
    @(Sprite,Cocoa)(Cocoa,Pawpaw)
    @(Sprite,Pawpaw)
    @(Granadilla,Strawbery)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)(Strawbery,Stone)
    @(Granadilla,Stone)(Stone,Yam)(Stone,Yam)(Stone,Yam)
    @(Granadilla,Yam)(Yam,Cocoa)(Yam,Cocoa)
    @(Granadilla,Cocoa)(Cocoa,Pawpaw)
    @(Granadilla,Pawpaw)
    @(Strawbery,Stone)(Stone,Yam)(Stone,Yam)(Stone,Yam)
    @(Strawbery,Yam)(Yam,Cocoa)(Yam,Cocoa)
    @(Strawbery,Cocoa)(Cocoa,Pawpaw)
    @(Strawbery,Pawpaw)
    @(Stone,Yam)(Yam,Cocoa)(Yam,Cocoa)
    @(Stone,Cocoa)(Cocoa,Pawpaw)
    @(Stone,Pawpaw)
    @(Yam,Cocoa)(Cocoa,Pawpaw)
    @(Yam,Pawpaw)
    @(Cocoa,Pawpaw)

    Your program description makes no sense. What exactly is it supposed to do?
    Your errors make no sense. What is it doing wrong?
    Your program output makes no sense. Look up pre-order, in-order, and post-order notation for representing trees. Pick one of those that you think would be best. I would go with pre-order. Because what you are doing isn't understandable.
    By the way, I think your concept of a tree is flawed. A node in a tree has 3 things. it has a reference to its parent, it has references to any of its children, and it has some key value that represents the node (if each node were represented by numbers, the value would be an integer or something). In the case of the root, its reference to its parent is null. I don't know what you are doing with your tree, but it is highly confusing.

  • Problem with 2 View Objects based on One Entity -Probably a Bug in ADF BC

    Hi
    I am using JDeveloper 10.1.3(SU5) and adf faces and ADF BC and to explain my problem I use HR schema.
    First, I created 2 view objects based on countries table named as TestView1 and TestView2. I set TestView1 query where clause to region_id=1 and TestView2 query where clause to region_id!=1 in the view object editor and then I created 2 separated form on these 2 view objects by dragging and dropping from data control palette.
    Now when I insert a record in the form based on TestView1 with region_id set to 1 and commit the record and go to the next form I can see the record in the second form which is completely wrong since it is against the where clause statement of the second form.
    I am really confused and the situation is very wired and it seems to me something like bug in adf bc.Am I right.Is there any work around or solution for solving this problem.
    Any help would be highly appreciated.
    Best Regards,
    Navid

    Dear Frank,
    Thank you very much for your quick response.
    Reading your helpful comments now I have some questions:
    1- I have commited the record in the database so shouldn't the query of view objects be re-queried?
    2- We try to use ClearVOCaches (entity_name,false) in afterCommit of the base entity object but unfortunately it does not work correctly. after that,We got root app module and used findViewObject method to find all the view of that entity (we have found them by using name not automaticlly) and called executeQuery of all views. From my point of view it has 2 big disadvantages. First suppose that this entity is an important entity and 4 or 5 viow objects are based on it. Now, For inserting one record we should re-execute 4 or 5 view which I think makes some performance issues. Besides, If during the development one programmer add a new view object based on this entity and don't add the executeQuery in the afterCommit for this view, again we have the same problem. Isn't there at least a way that automatically refresh all related view objects however the performance issue still exists.
    3- You mentioned that this issue is handled in the developer guide. Could you kindly give me a refrence which developer guide you mean and which section I should read to overcome this problem.(I have ADF Developer's Guide for Forms/4GL Developer's Guide , however I search for clearVOCaches and surprisingly nothing was found!!!)
    4- Could you please give me some hints that from your point of view what is the best method to solve this problem with minimum performance effect.
    Any comment would be of some great help.
    Thanks in advance,
    Navid

  • Lightroom 4.2 - Experiencing problems with images viewed on 2nd monitor

    Hi All,
    This problem seems to have started with my updating from 4.1 to 4.2.  I have my second monitor set as Loupe - Normal and Fit.  As I crop an image on my main monitor, the 2nd monitor view does not always change to the cropped view.  If I switch to a different photo and then back to the one I just cropped, the 2nd monitor view will then show the cropped image, but it is almost always blurry.  Sometimes I can click the image in the 2nd monitor view to change to a 1:1 view and it will look sharp, and then click again back to Fit and then it too will be sharp.  Other times I get a message in the 2nd monitor view that says "no image selected" and bouncing back and forth between a different image will correct this.
    This all started off with the majority, but not all cropped images showing as blurred and progressed to what I have described above.  I seriously though I had a focus problem with my camera!
    Is anyone else experinecing this since updating?  Suggestions?
    Below is the suggested information to provide...
    What version of Lightroom? 4.2
    Have you installed the recent updates? Yes, 4.2
    What operating system? Windows 7 Ultimate 64 bit
    What kind(s) of image file(s)? All images are converted to .dng upon import
    If you are getting error message(s), what is the full text of the error message(s)? No error messages.
    What were you doing when the problem occurred? I am in the develop module cropping images etc.
    What other software are you running? Silver Efex Pro 2, but I have had that installed in many prior versions of Lightroom
    Tell us about your computer hardware. How much RAM is installed? 32 GB - Yes, I know - overkill... 
    How much free space is on your system (C:) drive? 119 GB of 223 GB of my solid state drive c:\
    Has this ever worked before? Yes
    If so, do you recall any changes you made to Lightroom, such as adding Plug-ins, presets, etc.? No other changes other than updating to 4.2
    Did you make any changes to your system, such as updating hardware, printers or drivers, or installing/uninstalling any programs?  No, no other changes.
    Thanks!

    Same problem.   Not a soloution, but this may be relevant.
    http://forums.adobe.com/message/4782916#4782916
    Alan

  • Problem with creating/viewing PDF's from InDesign CS3

    I have a problem with our PDF workflow and just cannot seem to resolve it.
    The problem is as follows: My coworker and I (both designers running CS3 on iMac's running 10.5.6 Leopard) work daily on producing documents and graphic layouts.
    Internally we can view and print PDF documents we create just fine with no troubles with the exception of our supervisor, who is running a mac with Tiger operating system. Our office environment is both Mac and PC. On may occasions he cannot print PDF's we create. Many times his prints will contain garbled characters, drop italics and formatting, replace fonts, or just print slowly.
    This problem is also happening to our editor who is offsite. This is a fairly serious problem for her, considering her job relies heavily on being able to view and open PDF files we create. She was able to send a PDF file which shows the garbled mess her printer spit out when she printed. Apparently there were pages upon pages of messy garbled text. When documents do print from her, they are usually very slow in printing, taking up to a minute or more to print each page.
    The sample of what she sent me is attached, and can also be found on my MobileMe iDisk at: http://public.me.com/rlcollier (document entitled Print Results.PDF)
    My question really to the community is obviously what might be causing these problems. Its very frustrating not being able to determine if its something we're doing ourselves thats causing some incompatability or corruption in these files, or if its the users systems themselves. I can say that Debra our editor has can have a garbled mess of a 4 page file from us, and then turn around and print a graphic heavy 90 page PDF with ease from Boeing. Our PDF's seem to be the only ones she struggles with. That being said, my inclination is that its something on our end.
    Any ideas of where to start looking? Any help at all would be greatly appreciated and welcomed. Thanks!

    I currently had our editor test printing of some of our files using both Foxit and Adobe Reader (as was suggested) in order to see if either made a difference in her printing ability and here is what she came back with:
    I tried to print out both these pdfs (David's is the one you reworked and Lisa's HESSM-3, both sent yesterday).
    With Adobe:  David's first page printed quickly, but it had errors (part of his pants didn't print, and there's an arbitrary shaded box in the text).  Page 2 didn't print--every time I tried it had a different "offending command" code.  Printing Lisa's HESSM  made it up to page 7 before problems showed up (stock photo only partially printed), and it stopped on page 8 (with the random "offending command" code).
    With Foxit:  Both David's and the HESSM pdfs printed completely and without error...but it took a long time.   David's 2 pages took about 3 to 4 minutes, and HESSM's 16 pages took close to 20 minutes.  The time is in the transfer of data to the printer; the physical printing  goes pretty quickly.
    I cant say that I believe email is the problem, although I cant rule it out. I've tested emailing vs. passing through our workgroup with my supervisor, and it does not make any difference in his ability (or lack of ability) to print our files. He was able to print to a different printer (an HP 4650 as opposed to a 4100) without troubles. He refuses to believe its a printer problem however because PDF files originating from our office are the only ones he has trouble with. Never has he had any trouble with a single PDF file produced from any other source. This is also the case for our editor who only has trouble with PDF files originating from either mine, or my coworkers systems.
    PS: I've attached both files that were referenced by our editor above for viewing/testing.

Maybe you are looking for