How to fill a Tree in Java?

Hello,
I have a tree to realize the navigation on my site and now I want to build this tree in a dataProvider. I found the class SimpleTreeData which seems to link to the <nodes>-Tag but I can't get it work. Here are some code extracts:
DataProvider:
private SimpleTreeData createShopNode(String text, String description)
 SimpleTreeData data = new SimpleTreeData();
 data.setText( text );
 if ( description != null )
   data.setDescription( description);
 data.setDestination( "http://bali.us.oracle.com");
 data.setDestinationText( "More Information");
 return data;
private DataObject createData(RenderingContext context, String ns, String name)
  SimpleTreeData treeRoot = new SimpleTreeData();
  SimpleTreeData shop = createShopNode("Shop", "Spend some money!");
  SimpleTreeData books = createShopNode("Books", null);
  SimpleTreeData umbrellas = createShopNode("Umbrellas", "Rain, rain go away");
  SimpleTreeData art = createShopNode("Art", "Picasso et al");
  books.addChild( art);
  shop.addChild(books);
  shop.addChild(umbrellas);
DictionaryData lDictionaryData = new DictionaryData();
lDictionaryData.put( "dynamicNode", shop);
return lDictionaryData;
This is my UIX Page:
<provider>
<data name="TreeProxy">
<method class="test.DataTrees" method="getTreeProxy"/>
</data>
<data name="treeData">
<method class="test.NavigationNodes"
method="createData"/>
</data>
</provider>
<tree data:proxy="proxy@TreeProxy">
<include data:node="dynamicNode@treeData"/>
</tree>
Thanks,
Christian

Perhaps it is helpful, I get this Exception:
java.lang.IllegalAccessException: de/oc/vera/navigation/NavigationNodes
java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[])
native code
oracle.cabo.ui.data.DataObject oracle.cabo.ui.data.provider.MethodDataProvider.getDataObject(oracle.cabo.ui.RenderingContext, java.lang.String, java.lang.String)
oracle.cabo.ui.data.DataObject oracle.cabo.ui.data.provider.TableDataProvider.getDataObject(oracle.cabo.ui.RenderingContext, java.lang.String, java.lang.String)
oracle.cabo.ui.data.DataObject oracle.cabo.ui.data.provider.CachingDataProvider.getDataObject(oracle.cabo.ui.RenderingContext, java.lang.String, java.lang.String)
oracle.cabo.ui.data.DataObject oracle.cabo.ui.data.provider.DataProviderStack.getDataObject(oracle.cabo.ui.RenderingContext, java.lang.String, java.lang.String)
oracle.cabo.ui.data.DataObject oracle.cabo.ui.laf.base.TryRenderer$CatchContext.getDataObject(oracle.cabo.ui.RenderingContext, java.lang.String, java.lang.String)
oracle.cabo.ui.data.DataObject oracle.cabo.ui.RenderingContextProxy.getDataObject(java.lang.String, java.lang.String)
java.lang.Object oracle.cabo.ui.data.DataBoundValue.getValue(oracle.cabo.ui.RenderingContext)
java.lang.Object oracle.cabo.ui.BaseUINode.getAttributeValueImpl(oracle.cabo.ui.RenderingContext, oracle.cabo.ui.AttributeKey, boolean)
java.lang.Object oracle.cabo.ui.BaseUINode.getAttributeValue(oracle.cabo.ui.RenderingContext, oracle.cabo.ui.AttributeKey)
oracle.cabo.ui.data.DataObjectList oracle.cabo.ui.laf.base.BaseLafRenderer.getDataObjectListAttributeValue(oracle.cabo.ui.RenderingContext, oracle.cabo.ui.UINode, oracle.cabo.ui.AttributeKey)
void oracle.cabo.ui.laf.browser.TreeRenderer.renderContent(oracle.cabo.ui.RenderingContext, oracle.cabo.ui.UINode)
void oracle.cabo.ui.BaseRenderer.render(oracle.cabo.ui.RenderingContext, oracle.cabo.ui.UINode)
void oracle.cabo.ui.laf.xhtml.XhtmlLafRenderer.render(oracle.cabo.ui.RenderingContext, oracle.cabo.ui.UINode)
void oracle.cabo.ui.BaseUINode.render(oracle.cabo.ui.RenderingContext, oracle.cabo.ui.UINode)
void oracle.cabo.ui.BaseUINode.render(oracle.cabo.ui.RenderingContext)
void oracle.cabo.ui.BaseRenderer.renderChild(oracle.cabo.ui.RenderingContext, oracle.cabo.ui.UINode)
void oracle.cabo.ui.BaseRenderer.renderIndexedChild(oracle.cabo.ui.RenderingContext, oracle.cabo.ui.UINode, int)

Similar Messages

  • How to fill a Tree in Java based on the BC4J?

    Hi,
    I want to build a tree based on the BC4J and then I want to use it with hGrid, could anyone please give me a example code.
    Thanks
    Mohammad Tahir

    Hi,
    I want to build a tree based on the BC4J and then I want to use it with hGrid, could anyone please give me a example code.
    Thanks
    Mohammad Tahir

  • How to fill or bind data using Value Node in Tree Node

    Hi Gurus,
    Can anybody help me on how to fill data or bind data using Value Node in Tree Node View. I know how to create Tree Node but not able to show value on the UI in Tree View.
    Can u please let if anybody has done it?
    Thanks in advance.
    Madhusudan

    continued...
    TRY.
              lv_child = me->node_factory->get_proxy(
                        iv_bo = lv_value_node
                        iv_parent_proxy = me
                        iv_proxy_type = 'ZL_CLASS_CN02' ).
              lv_child->is_leaf = 'X'.
              APPEND lv_child TO rt_children.
            CATCH cx_sy_move_cast_error cx_sy_ref_is_initial.
          ENDTRY.
      In the above code iv_bo , lv_value_node will be the actual object of the second node or leaf node here, which will have the same structure of parent node along with data. After/before this, you would need to build table and refresh in do-prepare_output of IMPL class.In the above code iv_bo , lv_value_node will be the actual object of the second node or leaf node here, which will have the same structure of parent node along with data. After/before this, you would need to buid table and refresh in do-prepare_output of IMPL class.
    ztyped_context->resultlist->build_table( ).
      IF ztyped_context->resultlist->node_tab IS INITIAL.
        ztyped_context->resultlist->refresh( ).
      ENDIF.
    Also the EH_ONEXPAND has to be implemented and event handled in DO_HANDLE_EVENT. But this expand event has to be delegated to context node directly as CL_BSP_WD_CONTEXT_NODE_TREE will already have the implementation.
    ztyped_context->resultlist->expand_node( lv_event->row_key ).
    Where in result list is the node ZL_CLASS_CN00.
    After typing the whole content , i found this blog :). There are few things i have written more that in the blog.  /people/poonam.assudani/blog/2009/06/24/create-a-tree-view-display-in-crm-web-ui
    Regards,
    Karthik

  • Navigation Example Tree ( How to fill it? )

    Dear Gurus,
    I would like to make a tree of company structure by using com.sap.pct.pdk.navigation.NavigationExample1 iView. I have two questions?
    1. How can I put my own datas to fill the tree?
    2. How can I change the title inside? (Navigation Component Example)
    Do you have any better idea for solution?
    Thanks:
    Levente

    Hi Levente,
    why do you want to use the NavigationExample?! If you want to develop a tree to visualize a hierarchical structure, why not just using HTMLB Tree element?
    Hope it helps
    Detlev
    PS: Please consider rewarding points for helpful answers on SDN. Thanks in advance!

  • How to make a Tree Node invisible?

    Hi
    I have got a JTree where I have created a DefaultTreeModel and a DefaultTreeCellRenderer. The JTree is filled to data from data base. These nodes after are used to do querys to a data base. But when in tree's level 2 has got only a child, this node I want to set like not visible. because this node i need it do querys.
    I have found a thread to explain something:
    http://forum.java.sun.com/thread.jsp?forum=57&thread=126031
    a) A kind to do, it is so
    I make a new Class extends DefaultTreeCellRenderer, but it doesn't work, the code is here
    public class SegnalarNodoRender extends DefaultTreeCellRenderer {
      public SegnalarNodoRender() {
      public Component getTreeCellRendererComponent(JTree tree, Object value,
                                                    boolean sel, boolean expanded, boolean leaf,
                                                    int row, boolean hasFocus) {
               Component comp;
              DefaultMutableTreeNode nodo = (DefaultMutableTreeNode) value;
              DefaultMutableTreeNode padreNodo = (DefaultMutableTreeNode) nodo.getParent();
               if (leaf && sel)  {
                 return super.getTreeCellRendererComponent(tree,value,sel,
                                                           expanded,leaf,row,hasFocus);}
               else
                 if (!leaf && nodo.getLevel()==2 && padreNodo.getChildCount()==1 ) {
                 //Set not visible
                   this.setVisible(false);
                   return  super.getTreeCellRendererComponent(tree, value, false,
                                                             expanded, leaf, row, hasFocus);
                 else {
                   return super.getTreeCellRendererComponent(tree, value, false,
                                                             expanded, leaf, row, hasFocus);
    }b) the anoher kinds it explains how to make it. It is extended a class from DefaultTreeModel, But it is in this function the this class(botton), where I don't know how the node sets to invisible. Why NodoPadre hasn't any function to set invisible.
    public Object getChild(Object parent, int index) {
      // DefaultMutableTreeNode NodoPadre = (DefaultMutableTreeNode) parent;
      // TreeNode p;
      // p = NodoPadre.getParent();
       return parent;
    }I hope somebody can help me.
    thanks in advanced.

    Hi,
    I have the same problem and would realy like to know how to do this´, using ADF Faces 11G with the up to date JDeveloper.
    I've found some blog entries in the web showing how to do this with a POJO-based approach. They insert Data programmatically based on a view object's result set, reading all data and inserting the data to the POJO.
    However, I like to
    1) Drag-And-Drop the data-control (based on one master and one details - view object and a view link) to a page and add it as tree table
    2) Get the folder icon only displayed when there are children
    3) get the last child (=leaf) displayed without folder icon.
    To make this possible, we should somehow extend the TreeModel Class and override the function isContainer
    @Override
    public boolean isContainer() {
      if (getRowData() != null) {
         MyRowImpl value = (MyRowImpl) getRowData();
        if (value.getChildValues() != null &&
           value.getChildValues().size() > 0) {
          return true;
        return false;
    }Can somehow please give me a hint how to extend the tree model base class (What class?) and how to get the framework to use this model class?
    Maybe there is a sample application for 11g somewhere?
    Thanks,
    Stefan
    Edited by: Stefan1979 on 04.11.2009 18:10

  • [Help Wanted] soap1.1 webservice, filling a tree with the result of calls...

    Hi,
    I'm having trouble with filling a tree with the result to
    calls to a document/wrapped soap 1.1 webservice.
    I first declared the webservice in the mxml file as it was in
    the examples and tried to call it with no luck. The fault was it
    wasn't finding the document type for the call's unique parameter. I
    figured out the solution to this, I added a method in the
    webservice declaration having a single element named the same as
    the required parameter, and inside it, the "actual" parameters,
    bound to variables defined elsewhere.
    The reason for wanting the tree to be filled programatically,
    is the potential whole contents of the tree can be about 1.000.000
    nodes. Huge.
    quote:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute" applicationComplete="initM()">
    <mx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    import mx.controls.Alert;
    import mx.controls.treeClasses.TreeListData;
    [Bindable] public var aParentId:String = null;
    [Bindable] public var aLevel:Number = 0;
    ]]>
    </mx:Script>
    <mx:WebService id="lws" wsdl="
    http://myServer/myContext/myPortURI?WSDL"
    useProxy="false" makeObjectsBindable="true">
    <mx:operation name="getNodes" resultFormat="object">
    <mx:request>
    <getNodesElement>
    <parentId>{aParentId}</parentId>
    <level>{aLevel}</level>
    </getNodesElement>
    </mx:request>
    </mx:operation>
    </mx:WebService>
    <mx:Tree x="0" y="0" width="326" height="100%"
    id="layoutTree" enabled="true" labelField="nodeName">
    <mx:dataProvider>{lws.getNodes.lastResult}</mx:dataProvider>
    </mx:Tree>
    <mx:Script>
    <![CDATA[
    public function initM():void {
    lws.getNodes.send();
    return;
    ]]>
    </mx:Script>
    </mx:Application>
    So, here's the problem:
    1.- In both Java2 and .NET, I've been able to produce sets of
    proxy classes from the webservice wsdl, these include a proxy class
    for the service port and a set of classes for both the call
    parameter types and the call result types. I have not found yet a
    way to do the same with flex2, so I wonder, can I produce the
    required classes for dealing with such a webservice in an automatic
    way with flex2?
    2.- The second problem, is I haven't found a way to make a
    webservice call in sychronous mode, and I can't seem to find a way
    to set the parameters for the subsequent calls to the webservice.
    Is there a way to make a call to such webservice programatically? I
    mean, I've been able to make the first call I need programatically,
    but what if I end up making 2 or more simultaneous calls? I can't
    rely on setting the `variables defined elsewhere` before each call,
    because of possible concurrency issues (calls will be long after
    the 2nd level of the tree), so I wonder if there's a way to make a
    call to such webservice (document/wrapped, soap1.1) passing it the
    parameters programatically. If so, can I just put the parameters or
    do I have to produce the complete enclosure? If I have to produce
    also the enclosure, any hint on how to do so? I will need to pass
    different parentId, level pairs probably triggered by tree events.
    3.- the other problem, finally, is Tree looks quite different
    to me than the Java2 one. In java2, I can easily produce a changing
    model for the tree wich will even handle the calls to the
    webservice as needed (triggered by the tree itself), making it a
    `live model`. If there is a way to produce the same behaviour in
    flex2, I haven't found it yet. Sure, I've only downloaded the trial
    version yesterday, so I may have overlooked some docs or blogs.
    Any hints would be appreciated, specially on programatically
    modifying the tree, and making calls to the webservice changing the
    parameters every time.

    1. Not yet, but we're looking into supporting this in an
    upcomming release.
    2. All RPC requests must be made asynchronously... this is a
    restriction of the way the Flash Player makes network requests
    (otherwise movies, which are single threaded, would hang waiting
    for results). You should be able to use the ActionScript API to
    programmatically call web services with normal parameters.
    3. If you leave makeObjectsBindable="true" (which it is by
    default) the Objects and Arrays will be wrapped in ObjectProxies
    and ArrayCollections automatically and will report change events,
    however I don't believe that we have an example that links these
    change events up to subsequent web service calls, but it would be
    possible (but not automatic). A feature that does do this sort of
    thing automatically is the Data Service, although this does not use
    WSDL/SOAP to describe/communicate with remote services and you have
    to setup a Java assembler to work with our adapters on the
    server.

  • How to create Hierarchy Tree Node structure?

    Hi experts,
              I want to know how to create a tree with kind of below Structure:
    Root A
             NodeA1
                  ITEMA1_IT1
                  ITEMA1_IT2
                  ITEMA1_IT3
             NodeA2
                  ITEMA2_IT1
                  ITEMA2_IT2
             NodeA3
                  ITEMA3_IT1
                  ITEMA3_IT2
                  ITEMA3_IT3
                  ITEMA3_IT4
    So when i click on Root A it shows me, NODEA1, NODEA2 & NODEA3....
    when further i click on NODEA1, it shows me items like  ITEMA1_IT1,ITEMA1_IT2, ITEMA1_IT3.
    when further i click on NODEA2, it shows me items like  ITEMA2_IT1,ITEMA2_IT2.
    SO item will get loaded when i click on perticular node.
    how its possible.
    I have gone through SDN so many threads, bt i didn't get exactly for webdynpro ABAP.
    Please guide me for the same.
    Thanks ,
    Saurin Shah

    Hi,
    you can create the tree you wanted as follows:
    1) create a node under your context say "root_node" with cardinality 1..1
    2) now create an attribute under it called "text" with type string.
    3) now create three nodes under this "root_node" called nodeA1 nodeA2 and nodeA3 with cardinality 0..n
    4) now under nodeA1 , nodeA2 and nodeA3 create an attribute called "text" with type string...so each node will have one attribute called "text" of type string...
    5) now create a node under nodeA1 called "itemA1" with cardinlity 0..n
    6) now create an attribute called "text" of type string under this node "itemA"...
    7) repeat step 5 and 6 for the other two nodes...nodeA2 and nodeA3
    8) now create six supply functionsthese functions will supply the text values for your nodes-
    I created like this:
    FILL_ITEM1
    FILL_ITEM2
    FILL_ITEM3
    FILL_NODEA1
    FILL_NODEA2
    FILL_NODEA3
    Note:*******************my view is called MAIN******************
    hence the coding is
    data
        lt_elements type if_main=>elements_nodea1.
    if you view is called view1...than the data declaration would be
    data
        lt_elements type if_view1=>elements_nodea1.
    9) go to each node and assign the supply function respectively....you can assign this by going to context tab and selecting the node you want to assign the supply function to and just type in the name of the supply funciton or do the help for that field by clicking on the little square btn...
    10) now we go the layout tab and put the tree ui on the layout....bind the datasource property to the context node "root_node"
    and bind the rootText property to the attribute "text" of the root_node...
    11) now right click on this tree ui element under the ROOTUIELEMENTCONTAINER and select "insert node type" ...a box will appear where you can see it has two types of node for you....one is tree_node_type and other one is tree_item_type...
    create three nodes with tree_node_type with names "nodeA1" nodeA2 and nodeA3 and three with tree_item_type with names "itemA1" itemA2 and itemA3...
    12) now bind all these node types and item types data sources and texts with corresponding nodes and attributes under your context...
    so nodeA1datasource will get bind to context nodeA1 and itemA1 data source will get bind to itemA1 from context..and so on...
    13) now in the wddoinit method: I setup the text for the root node.....
    DATA lo_nd_root_node TYPE REF TO if_wd_context_node.
      DATA lo_el_root_node TYPE REF TO if_wd_context_element.
      DATA ls_root_node TYPE wd_this->element_root_node.
      DATA lv_root_txt TYPE wd_this->element_root_node-root_txt.
    navigate from <CONTEXT> to <ROOT_NODE> via lead selection
      lo_nd_root_node = wd_context->get_child_node( name = wd_this->wdctx_root_node ).
    get element via lead selection
      lo_el_root_node = lo_nd_root_node->get_element( ).
    @TODO fill attribute
    lv_root_txt = 'Root Node'.
    set single attribute
      lo_el_root_node->set_attribute(
        name =  `ROOT_TXT`
        value = lv_root_txt ).
    hope this will give you the solution you are looking for...
    Thanks...
    AS...........

  • Populate Flex Tree from Java Code (Database)

    Hi
    Can someone please help me? I'm very new to using flex. I'm
    basically trying to create a tree that is populated from data in my
    database. I am using hibernate to fetch that data.
    The plan is to basically create the tree in Java code (since
    I don't want any processing done on the client PC) and then pass
    this to the flex tree (or an actionscript data structure that is
    compatible as the tree datasource)
    I am creating the java tree using DocumentImpl. Is this
    correct? What class would work?
    Element e = null;
    Node n = null;
    Document xmldoc= new DocumentImpl();
    Element root = xmldoc.createElement("USERS");

    quote:
    Originally posted by:
    ntsiii
    Stop running and get a map (read the documents)
    This is hardly a useful comment and must discourage new users
    from asking questions. If you think the documentation relating to
    the use of the tree control is straightforward then I beg to
    differ.
    If you are aware of a clear example of how to use the data
    tree with a php backend returning a remote data object please
    enlighten me. Meanwhile I continue my search but not within the
    livedocs.
    One site I have found that may be of use is
    http://flexdiary.blogspot.com/2009/01/lazy-loading-tree-example-file-posted.html
    Not everyone is an expert.

  • Creating non binary trees in Java

    Hi everybody actually i am used in creating binary trees in java,can u please tell me how do we create non binary -trees in java.

    Hi,
    Can u let us know the application area for Non binary tree.
    S Rudra

  • Non binary trees in java

    Hi guys i am used in creating binary trees ,tell me how do we create non binary trees in java.

    public class Node {
      private final Object payload;
      private final Set<Node> children;
      public Node(Object payload) {
        this.payload = payload;
        children = new HashSet<Node>();
      // now add methods to add/remove children, a method to do something with the payload (say,
      // a protected method that passes the payload to a method specified by some kind of interface),
      // and methods to recurse over children.
    }Actually rather than using Object probably should have generic-ized the class, but whatever.

  • Binary Tree in Java - ******URGENT********

    HI,
    i want to represent a binary tree in java. is there any way of doing that.
    thanx
    sraphson

    HI,
    i want to represent a binary tree in java. is there
    e any way of doing that.
    thanx
    sraphsonFirst, what is a binary tree? Do you know how the binary tree looks like on puesdo code? How about a representation in terms of numbers? What is a tree? What is binary? The reason I ask is, what do you know about programming?
    Asking to represent a binary tree in java seems like a question who doesn't know how it looks like in the first please. Believe me, I am one of them. I am not at this level yet. If you are taking a class that is teaching binary trees and you don't know how it looks like, go back to your notes.
    Sounds harsh, but it is better to hear it from a person that doesn't know either then a boss that hired you because Computer Science was what you degree said. Yet, you don't know how to program?
    Telling you will not help you learn. I can show you tutorials of trees would be start on where to learn.
    HOW TO USE TREES (oops this is too simple, but it is a good example)
    http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html
    CS312 Data Structures and Analysis of Algorithms
    (Here is a course about trees. Search and learn)
    http://www.calstatela.edu/faculty/jmiller6/cs312-winter2003/index.htm

  • Binary trees in Java

    Hi there
    Do you have any suggestions about how to implement trees or binary trees in Java?
    As far as I know there are already some libraries for that, but I don't know how to use them. Was trying to get some implementation examples but I'm still very confused.
    How can I use for example:
    removeChild(Tree t)
    addChild(Tree t)
    isLeaf()
    Thanks in advance

    Lulu wrote:
    Hi there
    I have several questions about binary trees
    Let's see, I use TreeMap to create them with the following code:
    TreeMap treeMap = new TreeMap<Integer, String>();
    treeMap.put("first", "Fruit");
    treeMap.put("second","Orange");
    treeMap.put("third", "Banana");
    treeMap.put("fourth", "Apple");You've defined the map to hold integer keys and strings as values, yet you're trying to add string keys and string values to it: that won't work.
    If this is a map how do I define if the data should go to the left or to the right of certain node?That is all done for you. In a TreeMap (using the no-args constructor), you can only store objects that are comparable to each other (so, they must implement the Comparable interface!). So the dirty work of deciding if the entry should be stored, or traversed, into the left or right subtree of a node, is all done behind the scenes.
    Also note that TreeMap is not backed up by a binary tree, or a binary search tree, but by a red-black tree. A red-black tree is a self balancing binary tree structure.
    Should I have dynamical keys so that they increase automatically when adding new data?
    According to a webpage I should use Comparator(), is that to find the data in the tree and retrieve the key?
    ThanksI am not sure what it is you want. I am under the impression that you have to write a binary tree (or a binary search tree) for a course for school/university. Is that correct? If so, then I don't think you're permitted to use a TreeMap, but you'll have to write your own classes.

  • Filling a tree with the result of calls to a document/wrapped soap1.1 webservice

    Hi,
    I'm having trouble with filling a tree with the result to
    calls to a document/wrapped soap 1.1 webservice.
    I first declared the webservice in the mxml file as it was in
    the examples and tried to call it with no luck. The fault was it
    wasn't finding the document type for the call's unique parameter. I
    figured out the solution to this, I added a method in the
    webservice declaration having a single element named the same as
    the required parameter, and inside it, the "actual" parameters,
    bound to variables defined elsewhere.
    The reason for wanting the tree to be filled programatically,
    is the potential whole contents of the tree can be about 1.000.000
    nodes. Huge.
    quote:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute" applicationComplete="initM()">
    <mx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    import mx.controls.Alert;
    import mx.controls.treeClasses.TreeListData;
    [Bindable] public var aParentId:String = null;
    [Bindable] public var aLevel:Number = 0;
    ]]>
    </mx:Script>
    <mx:WebService id="lws" wsdl="
    http://myServer/myContext/myPortURI?WSDL"
    useProxy="false" makeObjectsBindable="true">
    <mx:operation name="getNodes" resultFormat="object">
    <mx:request>
    <getNodesElement>
    <parentId>{aParentId}</parentId>
    <level>{aLevel}</level>
    </getNodesElement>
    </mx:request>
    </mx:operation>
    </mx:WebService>
    <mx:Tree x="0" y="0" width="326" height="100%"
    id="layoutTree" enabled="true" labelField="nodeName">
    <mx:dataProvider>{lws.getNodes.lastResult}</mx:dataProvider>
    </mx:Tree>
    <mx:Script>
    <![CDATA[
    public function initM():void {
    lws.getNodes.send();
    return;
    ]]>
    </mx:Script>
    </mx:Application>
    So, here's the problem:
    1.- In both Java2 and .NET, I've been able to produce sets of
    proxy classes from the webservice wsdl, these include a proxy class
    for the service port and a set of classes for both the call
    parameter types and the call result types. I have not found yet a
    way to do the same with flex2, so I wonder, can I produce the
    required classes for dealing with such a webservice in an automatic
    way with flex2?
    2.- The second problem, is I haven't found a way to make a
    webservice call in sychronous mode, and I can't seem to find a way
    to set the parameters for the subsequent calls to the webservice.
    Is there a way to make a call to such webservice programatically? I
    mean, I've been able to make the first call I need programatically,
    but what if I end up making 2 or more simultaneous calls? I can't
    rely on setting the `variables defined elsewhere` before each call,
    because of possible concurrency issues (calls will be long after
    the 2nd level of the tree), so I wonder if there's a way to make a
    call to such webservice (document/wrapped, soap1.1) passing it the
    parameters programatically. If so, can I just put the parameters or
    do I have to produce the complete enclosure? If I have to produce
    also the enclosure, any hint on how to do so? I will need to pass
    different parentId, level pairs probably triggered by tree events.
    3.- the other problem, finally, is Tree looks quite different
    to me than the Java2 one. In java2, I can easily produce a changing
    model for the tree wich will even handle the calls to the
    webservice as needed (triggered by the tree itself), making it a
    `live model`. If there is a way to produce the same behaviour in
    flex2, I haven't found it yet. Sure, I've only downloaded the trial
    version yesterday, so I may have overlooked some docs or blogs.
    Any hints would be appreciated, specially on programatically
    modifying the tree, and making calls to the webservice changing the
    parameters every time.

    I would re-post to the Flex Data Services forum.

  • How to create a tree structure using list items(tlist)

    HI every one,
    As we know how to create a tree structure using Hierarchy item type.
    We have a requirement to create The same tree like structure using List Item(Tlist)
    I would be so appreciated If you send with an example
    Thanks
    RangaReddy

    Hi all
    Any one help me please
    Actually our client requirement is creation of tree structure using list item,similar to what we used in oracle Application(FNDSCSGN) form.We did the tree structure using hierarchy tree using Htree and Ftree.It working excelently.For client requirement, we want to use list item.How PJC(Pluggable Java Components) is useful for using list item(Tlist).I can't understand how it is useful.
    Do you have any example please help me.
    Thanks
    RangaReddy

  • How to fill a hashed table ?

    Hi,
    In my last thread i had asked about the ways of deleting the cube contents selectively using a job/FM and i was suggested this by one of you.
    CALL FUNCTION 'RSDRD_SEL_DELETION'
    EXPORTING
    I_DATATARGET = 'YOUR_CUBE'
    I_THX_SEL = L_THX_SEL
    I_AUTHORITY_CHECK = 'X'
    I_THRESHOLD = '1.0000E-01'
    I_MODE = 'C'
    I_NO_LOGGING = ''
    I_PARALLEL_DEGREE = 1
    I_NO_COMMIT = ''
    CHANGING
    C_T_MSG = L_T_MSG.
    Although the FM is the correct one the structure L_THX_SEL is a hashed table structure and i am not aware how to fill values into it. My requirement is to give a condition for the 0CALDAY info-object i.e 0CALDAY < 30 days. Please suggest me.
    Regadrs,
    Pramod M

    HI,
    Internal Tables
    Internal tables provide a means of taking data from a fixed structure and storing it in working memory in ABAP. The data is stored line by line in memory, and each line has the same structure. In ABAP, internal tables fulfill the function of arrays. Since they are dynamic data objects, they save the programmer the task of dynamic memory management in his or her programs. You should use internal tables whenever you want to process a dataset with a fixed structure within a program. A particularly important use for internal tables is for storing and formatting data from a database table within a program. They are also a good way of including very complicated data structures in an ABAP program.
    Data Type of an Internal Table
    The data type of an internal table is fully specified by its line type, key, and table type.
    Line Type
    The line type of an internal table can be any data type. The data type of an internal table is normally a structure. Each component of the structure is a column in the internal table. However, the line type may also be elementary or another internal table.
    Key
    The key identifies table rows. There are two kinds of key for internal tables - the standard key and a user-defined key. You can specify whether the key should be UNIQUE or NON-UNIQUE. Internal tables with a unique key cannot contain duplicate entries. The uniqueness depends on the table access method.
    At tables with structured row type, the standard key is formed from all character-type columns of the internal table. If a table has an elementary line type, the default key is the entire line. The default key of an internal table whose line type is an internal table, the default key is empty. At tables with non-structured row type, the standard key consists of the entire row. If the row type is also a table, an empty key is defined.
    The user-defined key can contain any columns of the internal table that are no internal table themselves, and do not contain internal tables. References are allowed as table keys. Internal tables with a user-defined key are called key tables. When you define the key, the sequence of the key fields is significant. You should remember this, for example, if you intend to sort the table according to the key.
    Table type
    The table type determines how ABAP will access individual table entries. Internal tables can be divided into three types:
    Standard tables have an internal linear index. From a particular size upwards, the indexes of internal tables are administered as trees. In this case, the index administration overhead increases in logarithmic and not linear relation to the number of lines. The system can access records either by using the table index or the key. The response time for key access is proportional to the number of entries in the table. The key of a standard table is always non-unique. You cannot specify a unique key. This means that standard tables can always be filled very quickly, since the system does not have to check whether there are already existing entries.
    Sorted tables are always saved sorted by the key. They also have an internal index. The system can access records either by using the table index or the key. The response time for key access is logarithmically proportional to the number of table entries, since the system uses a binary search. The key of a sorted table can be either unique or non-unique. When you define the table, you must specify whether the key is to be UNIQUE or NON-UNIQUE. Standard tables and sorted tables are known generically as index tables.
    Hashed tables have no linear index. You can only access a hashed table using its key. The response time is independent of the number of table entries, and is constant, since the system access the table entries using a hash algorithm. The key of a hashed table must be unique. When you define the table, you must specify the key as UNIQUE.
    Generic Internal Tables
    Unlike other local data types in programs, you do not have to specify the data type of an internal table fully. Instead, you can specify a generic construction, that is, the key or key and line type of an internal table data type may remain unspecified. You can use generic internal tables to specify the types of field symbols  and the interface parameters of procedures . You cannot use them to declare data objects.
    Internal Tables as Dynamic Data Objects
    Internal tables are always completely specified regarding row type, key and access type. However, the number of lines is not fixed. Thus internal tables are dynamic data objects, since they can contain any number of lines of a particular type. The only restriction on the number of lines an internal table may contain are the limits of your system installation. The maximum memory that can be occupied by an internal table (including its internal administration) is 2 gigabytes. A more realistic figure is up to 500 megabytes. An additional restriction for hashed tables is that they may not contain more than 2 million entries. The line types of internal tables can be any ABAP data types - elementary, structured, or internal tables. The individual lines of an internal table are called table lines or table entries. Each component of a structured line is called a column in the internal table.
    Choosing a Table Type
    The table type (and particularly the access method) that you will use depends on how the typical internal table operations will be most frequently executed.
    Standard tables
    This is the most appropriate type if you are going to address the individual table entries using the index. Index access is the quickest possible access. You should fill a standard table by appending lines (ABAP APPENDstatement), and read, modify and delete entries by specifying the index (INDEX option with the relevant ABAP command). The access time for a standard table increases in a linear relationship with the number of table entries. If you need key access, standard tables are particularly useful if you can fill and process the table in separate steps. For example, you could fill the table by appending entries, and then sort it. If you use the binary search option (BINARY) with key access, the response time is logarithmically proportional to the number of table entries.
    Sorted tables
    This is the most appropriate type if you need a table which is sorted as you fill it. You fill sorted tables using the INSERTstatement. Entries are inserted according to the sort sequence defined through the table key. Any illegal entries are recognized as soon as you try to add them to the table. The response time for key access is logarithmically proportional to the number of table entries, since the system always uses a binary search. Sorted tables are particularly useful for partially sequential processing in a LOOP if you specify the beginning of the table key in the WHEREcondition.
    Hashed tables
    This is the most appropriate type for any table where the main operation is key access. You cannot access a hashed table using its index. The response time for key access remains constant, regardless of the number of table entries. Like database tables, hashed tables always have a unique key. Hashed tables are useful if you want to construct and use an internal table which resembles a database table or for processing large amounts of data.
    If help full please give me max Reward

Maybe you are looking for

  • Training and Event Management Integration with FICO

    How Training & Event Management is integrated with FICO? How it will be integrated and where? Could you please put it in simple way?

  • HT4059 How can I see how many downloads my book has had?

    I'm trying to find where I can check the numbers of downloads my book has received, has anyone a clue of where I can check this? Thanks in advance for any help

  • Contract as a Source

    Hi Friends I have nearly 8000 items, most of them having contract but no sourcelist. While MRP run i want to assign contract as a source to the P.R, insteaded of creating Sourcelist for all the materails. Pl guide me how can i assign contract as a so

  • How to open oracle listner for three database instances

    please help me with following questions I have 3 database instances orcl JIP02T JIP04T when i start the oracle database, does it start all 3 instances? when i start the oracle listner, does it start listner for all 3 instances? when i echo $ORACLE_SI

  • JSP vs. Class

    this is a 2 part question.           1)at my company, jsp pages do a significan amount of server-side           processing while using regular class files for some additional           processing. my supervisor wants to remove as much as possible of