How to display an Array in a Tree

Hi everyone !
i have an Array of simple objects filled from my DB, and i
want to display it in a tree <mx:Tree>
do i have to convert the Array into a XMLList first of all?
and how???
if not, please anyone can help realising this ???
thank you ! :D

Your array will need to be objects so you can tell the tree
what children fields are. From the FB help sys:

Similar Messages

  • How to display XML generated dynamically, as TREE in cluster environment

    hai guys,
    we are generating a tree.xml file in server side as follows.
    path = getServletConfig().getServletContext().getRealPath("/QBE/jsp/tree.xml");
    BufferedWriter out1 = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(path),"UTF8"));
    out1.write(xmlString + "</tree>");
    out1.close();
    "xmlString" holds the data in xml tag format.
    in order to display the xml file in TREE structure, we are using a function like
    function createTree()
         var tree = new WebFXLoadTree("SMQ/AMQ List", "tree.xml");
         document.write(tree);
    ALL THIS MECHANISM IS WORKING FINE IN DEVELOPMENT ENVIRONMENT ANS AS WELL AS WHEN WE DEPLOY THE RELEASE IN LOCAL MACHINE. BUT IT IS NOT WORKING WHEN THE RELEASE IS DEPLOYED IN CLUSTER ENVIRONMENT.
    Please help me out how to solve this...
    thanks in advance,
    Ranga
    Edited by: Ranganatha on Jun 5, 2008 5:18 AM

    Hey if you want any more information regarding this problem, i can provide.

  • How to Display string array in jsp page using netui-data:repeater tag ??

    hi,
    I am trying to display a string array in a table using the netui-data:repeater tag.
    I have to use a page flow controller Array(1 Dimensional) to be displayed in the jsp.
    Can any one tell me how to print the array in a table of 3rows & 5 columns.
    Here is the code on which I am crrently working on.
    <netui-data:repeater dataSource="{pageFlow.strWorkObject_Array}">
    <netui-data:repeaterHeader>
    <table cellpadding="4" border="1" class="tablebody">
    </netui-data:repeaterHeader>
    <netui-data:repeaterItem>
    <tr>
    <td><netui:label value="{container.item}" >
    </netui:label></td>
    <td><netui:label value="{container.item}">
    </netui:label></td>
    <td><netui:label value="{container.item}">
    </netui:label></td>
    </tr>
    </netui-data:repeaterItem>
    <netui-data:repeaterFooter>
    </table>
    </netui-data:repeaterFooter>
    </netui-data:repeater>

    weblogic.developer.interest.workshop
    Mansoor Naseem wrote:
    I would like to know where the pageflow newsgroup is.
    These are all the groups in weblogic.developer.interest:
    weblogic.developer.interest.60beta.* (5 groups) weblogic.developer.interest.management
    weblogic.developer.interest.61beta.* (2 groups) weblogic.developer.interest.misc
    weblogic.developer.interest.clustering.* (1 group) weblogic.developer.interest.performance
    weblogic.developer.interest.commerce weblogic.developer.interest.personalization
    weblogic.developer.interest.ejb.* (3 groups) weblogic.developer.interest.portal
    weblogic.developer.interest.environment weblogic.developer.interest.rmi-iiop
    weblogic.developer.interest.jdbc weblogic.developer.interest.security
    weblogic.developer.interest.jms weblogic.developer.interest.servlet
    weblogic.developer.interest.jndi weblogic.developer.interest.tools
    weblogic.developer.interest.jsp weblogic.developer.interest.weblogicenterprise
    MN

  • How to display employee no in group tree without separator and decimals

    Post Author: makk07
    CA Forum: Formula
    Hi Everyone,   In my database the employee number is stored as follows:8,367.0029,785.00140,742.00   And in the report I have a group based on formula to display employee name and employee number. My formula is as follows:{@Full Name} & ' - ' & {table.EMPLOYEE NO}and in the group tree you will see it asjohn,smith - 140,742.00 but I want to display it as follows:john,smith - 140742, and I am using crystal XI   Please anybody suggest how to achieve that.Thanks in advance

    Post Author: SKodidine
    CA Forum: Formula
    Change your formula to:
    {@Full Name} & ' - ' & totext({table.EMPLOYEE NO},0,'','')

  • How to display an Array of ints in an Array of TextFields

    I'm trying to create an array of textfield's, and then create an array of ints and display one of those ints in each textfield. Can anyone please help me?

    Yea after you create the array of textfields and ints, do a for loop with textfield.length limit.
    for(int i = 0; i < textfield.length; i++){
    look in the JTextField API for how to put int into
    a text. I know, but if this is for a class, you have
    figure it out. (You might have to use the Integer object to convert it to a string
    I hope this helps. If you still can't get it, post some code and I'm sure someone will help you through it.
    gl
    kimoS

  • How to display a file system in tree view

    Hi all,
    I Developed an application (APEX 3.2) to track incoming and outging mail. Incoming mail is scaned and saved on "ARCHIVE" server directory structure as the following
    Incoming**2011*
    ** 1
    **2
    **3
    **4
    2011 is the year and numbers from 1 - 4 are letters ID. I have no problem to link the incoming mail with the image on file server (each letter must have an image)
    Some letters may have attachmentms (different format pdf, word, jpg, etc.)
    attachment*2011
    **2
    **4
    I would like to enable attachment link only for for letters with attachment in above case letter 2 and 4 and the directory where the attachment saved to be displayed in TREE view.
    Thank you.
    Ribhi

    Hi,
    have you tried
    <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/9d/a6884121a41c09e10000000a155106/frameset.htm">TextView</a> or <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/3b/219141c1d0ae5fe10000000a1550b0/frameset.htm">FormattedTextView</a> ?
    You could also make a development request.
    Regards, Heidi

  • How to display multiple JComponents in a tree cell renderer

    I have an object in a tree cell renderer and want to display its members(three members) status in a JTree as checkboxes such that each node displays three checkboxex with member-names and a node name. i tried using a JPanel and adding three labels into this panel to be returned for the cell renderer but the GUI fails to paint the node componnents. However on clicking the node the component which isn't visible displays correctly. please Help me out

    Since you didn't provide any sample code, it's all about wild guesses on what your problem is. The following code shows the type of program you could have posted :import javax.swing.*;
    import javax.swing.tree.*;
    import java.awt.*;
    public class TestTree extends JPanel {
         private static class MyCell {
              String theCellName;
              boolean theFirstField;
              boolean theSecondField;
              boolean theThirdField;
              public MyCell(String aName, boolean firstField, boolean secondField, boolean thirdField) {
                   theCellName = aName;
                   theFirstField = firstField;
                   theSecondField = secondField;
                   theThirdField = thirdField;
         private static class MyTreeCellRenderer extends JPanel implements TreeCellRenderer {
              private JLabel theCellNameLabel;
              private JCheckBox theFirstCheckBox;
              private JCheckBox theSecondCheckBox;
              private JCheckBox theThirdCheckBox;
              private DefaultTreeCellRenderer theDelegate;
              public MyTreeCellRenderer() {
                   super(new GridLayout(4, 1));
                   theCellNameLabel = new JLabel();
                   add(theCellNameLabel);
                   theFirstCheckBox = new JCheckBox("firstField");
                   add(theFirstCheckBox);
                   theSecondCheckBox = new JCheckBox("secondField");
                   add(theSecondCheckBox);
                   theThirdCheckBox = new JCheckBox("thirdField");
                   add(theThirdCheckBox);
                   theDelegate = new DefaultTreeCellRenderer();
                   setOpaque(true);
              public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected,
                                                                       boolean expanded, boolean leaf, int row, boolean hasFocus) {
                   if (!(value instanceof DefaultMutableTreeNode)) {
                        return theDelegate.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus);
                   Object userObject = ((DefaultMutableTreeNode)value).getUserObject();
                   if (!(userObject instanceof MyCell)) {
                        return theDelegate.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus);
                   setBackground(tree.getBackground());
                   if (selected) {
                        setBorder(BorderFactory.createLineBorder(Color.BLUE, 2));
                   } else {
                        setBorder(BorderFactory.createLineBorder(getBackground(), 2));
                   MyCell cell = (MyCell)userObject;
                   theCellNameLabel.setText(cell.theCellName);
                   theFirstCheckBox.setSelected(cell.theFirstField);
                   theSecondCheckBox.setSelected(cell.theSecondField);
                   theThirdCheckBox.setSelected(cell.theThirdField);
                   return this;
              public Component add(Component comp) {
                   if (comp instanceof JComponent) {
                        ((JComponent)comp).setOpaque(false);
                   return super.add(comp);
         public TestTree() {
              super(new BorderLayout());
              JTree tree = new JTree(createModel());
              tree.setShowsRootHandles(true);
              tree.setCellRenderer(new MyTreeCellRenderer());
              add(new JScrollPane(tree), BorderLayout.CENTER);
         private static final TreeModel createModel() {
              DefaultMutableTreeNode root = new DefaultMutableTreeNode(new MyCell("root", true, true, true));
              DefaultMutableTreeNode child1 = new DefaultMutableTreeNode(new MyCell("child1", false, true, false));
              DefaultMutableTreeNode child2 = new DefaultMutableTreeNode(new MyCell("child2", false, false, true));
              root.add(child1);
              root.add(child2);
              return new DefaultTreeModel(root);
         public static void main(String[] args) {
              final JFrame frame = new JFrame("Test");
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.setContentPane(new TestTree());
              SwingUtilities.invokeLater(new Runnable() {
                   public void run() {
                        frame.setSize(600, 400);
                        frame.show();
    }

  • How to display an array in a VB form

    I am new to Measurement Studio. This could be a silly question.
    I am so used to the front panel in Labview where you can have control/indicator arrays. You can expand an array to see several values at the same time. Plus you have an index display to scroll.
    Is there any similar feature in Measurement Studio for Visual Basic or Visual C? If not, why not.
    cheers

    No, there isn't currently a tabular or array control provided with Measurement Studio. There are a few reasons for this. First off, remember, LabVIEW is a graphical language, there isn't anything that isn't a control or indicator on a front panel. The array control in LabVIEW is mainly there as the datatype for arrays, not specifically as a UI object, although it is frequently used that way.
    In Measurement Studio, the focus of the User Interface components is adding the controls to Visual Studio that are needed for test and measurement applications. Visual Studio comes with a tabular type interface called the DataGrid control for displaying numeric and string data in a table format built-in. This is what you would want to use to display arrays. We
    would definately consider adding a table type interface if our users needed a lot more functionality than was provided by the Visual Studio DataGrid control.
    I know it can be frustrating going back and forth between the tools and seeing different things available. Remember, they are designed for different users though. Measurement Studio is designed to equip Visual Studio programmers to do Test & Measurement programming easily, it isn't designed to provide LabVIEW type functionality to Visual Studio users. So some LabVIEW functionality won't exist in Measurement Studio purposefully, and also some functionality in Measurement Studio that isn't in LabVIEW since it doesn't suit graphical programming.
    Try the DataGrid control, and let us know if it doesn't meet your needs.
    Best Regards,
    Chris Matthews
    National Instruments

  • How to display Image by using Array?

    Hi all, I know to how to display the image in MXML by using
    AS 3.0
    like this:
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    width="100" height="80" borderStyle="solid">
    <mx:Script>
    <![CDATA[
    [Embed(source="logo.gif")]
    [Bindable]
    public var imgCls:Class;
    ]]>
    </mx:Script>
    <mx:Image source="{imgCls}"/>
    <!--OR-->
    <mx:Image source="@Embed('assets/Nokia_6630.png')"/>
    </mx:Application>
    But the thing is I am building a list for display the images,
    the values is come from the Array. I am trying a different way for
    display it but no working, here is my code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml">
    <mx:Script>
    <![CDATA[
    public var PICTURE_ARRAY:Array = [{label:"FileA",
    icon:"@Embed('upload/myjpg.jpg')"},
    {label:"FileC", icon:"@Embed('upload/myjpg.jpg')"},
    {label:"FileB", icon:"@Embed('upload/myjpg.jpg')"}]
    ]]>
    </mx:Script>
    <mx:Tile id="pictureSelection" height="180" width="500"
    borderStyle="solid">
    <mx:Repeater id="picRP"
    dataProvider="{PICTURE_ARRAY}">
    <mx:VBox horizontalAlign="center" verticalAlign="middle"
    verticalGap="0" borderStyle="none" width="100" height="100">
    <mx:Image width="80" height="80"
    source="{picRP.currentItem.icon}"
    toolTip="{picRP.currentItem.icon}"/>
    <!--
    I also tryed this as well:
    set the icon value as picture location like: "A.jpg" or
    "B.jpg"
    then
    <mx:Image width="80" height="80"
    source="@Embed('upload/{picRP.currentItem.icon}')" />
    -->
    <mx:Label text="{picRP.currentItem.label}" width="100"
    textAlign="center"/>
    </mx:VBox>
    </mx:Repeater>
    </mx:Tile>
    </mx:Application>
    Can anyone tell how to display the array value into Image
    tag? Thanks

    In your data you have this:
    {label:"FileC", icon:"@Embed('upload/myjpg.jpg')"},
    change it to this:
    {label:"FileC", icon:"upload/myjpg.jpg"}, // this is just the
    filename, not embedded
    In your Repeater you have this Image tag:
    <mx:Image width="80" height="80"
    source="{picRP.currentItem.icon}"
    toolTip="{picRP.currentItem.icon}"/>
    which is fine, except for the toolTip. The toolTip uses a
    string, not an image. If you want to show an image in the toolTip,
    you'll need to write your own toolTip class.
    Now the source property of the image will be given the URL to
    the image which will then be requested from the server and
    downloaded at runtime - it is not embedded.
    If you need to embed the images, then your dataProvider
    should have the variable name associated with the embedded
    image.

  • How to list an array of objects using struts in jsp and ActionForm

    I am using the struts ActionForm and need to know how to display an Array of objects. I am assuming it would look like this in the ActionForm:
    private AddRmvParts addRmv[];
    But I am not sure how the getter and setter in the ActionForm should look. Should it be a Collection or an Iterator?
    I am thinking I need to use an iterator in the jsp page to display it.
    I am also wondering if the AddRmvParts class I have can be the same class that gets populated by the retrieval of data from the database. This class has 10 fields that need to display on the jsp page in 1 row and then multiple rows of these 10 fields.
    Thanks.

    Most probably the easiest way to make it accessible in your page is as a collection.
    ie
    public Collection getAddRmvParts()
    You can use the <logic:iterate> or a <c:forEach>(JSTL) tag to loop through the collection
    As long as the individual items in the collection provide get/set methods you can access them with the dot syntax:
    Example using JSTL:
    <c:forEach var="addRmvPart" items="${addRmvParts}">
      <c:out value="${addRmvPart.id} ${addRmvPart.name} ${addRmvPart.description}"/>
    </c:forEach>

  • How to display a seperate right click menu for each item of a tree control?

    Hi I want to display a specific right click menu when a particular tree item is selected. I know how to create a menu and how to display it. I am using the function GetLabelFromIndex() to get the active tree item and then compare the label and based on the result display a manu for that item. Now my problem is that when I use the above function in the EVENT_RIGHT_CLICK it gives me the error "the Index passed is out of range" while using the same function with the same arguments in EVENT_SELECTION_CHANGE it gives no error...below is the part of my code
    case EVENT_RIGHT_CLICK:
    GetLabelFromIndex(panelHandle, PANEL_TREE, eventData2, label1);
    //The function gives the stated error here
    if(eventData1)//after it I compare the result and display the menu
    case EVENT_SELECTION_CHANGE:
    GetLabelFromIndex (panelHandle, PANEL_TREE, eventData2, label1);
    //The function works fine here
    if (eventData1)
     If any one have any idea whats going on or alternate way of doing this Please share knowledge...Thanks
    If you are young work to Learn, not to earn.

    Hi,
    one possible approach of solving this problem is looking closer at the error message: The error "the Index passed is out of range" tells you that something is wrong with the index, either it is too small or too large So why don't you set a breakpoint and check the index value, it might be useful information...
    The other hint is to check the meaning of eventdata2 (using the help): It is different for different events! For the event_right_click it gives the horizontal mouse position, not the index as event_selection_change does...

  • How to display records of int. table in list tree?

    friends,
       i want to display a list tree using fm RS_TREE_CONSTRUCT and RS_LIST_DISPLAY.
    this is the data that i have to display
    Matnr      doc no.        Stock qty.     Age
    1     45601236           100          55
    1     45601237           10          54
    1     45601238        11          53
    1     45601239           101          52
    now, only the first record should be displayed with a + symbol... when the user clicks the + symbol, then the node has to expand and display the other 3 records pertaining to that material...how to display 4 fields of an internal table in one line and like that, 3 records...i have seen some threads relating to this, but they all display only one value in the child node..how to  display multiple fields like this?
    please address this functinality using FMs alone, as i am not exposed to objects :!
    thanks all
    Sathish. R

    satish,
    Before passing the Node name ,Concatenate all the values of record in one string and pass that string as node name.Now it will work.
    To develop the basic logic  simple program name is :
    "SAPSIMPLE_TREE_CONTROL_DEMO"  In this program use above logic.
    Don't forget to reward if useful.
    Don't forget to reward if useful

  • How to display array values in jsp of screen flows

    Hi,
    can u please help me .
    I am having one array variable i have stored all the values but i have to display that in JSP page .how to display
    Edited by: user12171025 on Nov 4, 2009 11:11 PM

    Hi,
    I think that its necessaries to use AJaX.
    I am implemeting something like that.
    I have a input text that works like a filter and depends on what my user types in input text I populate my table with some information.
    In order to do that, I put in my JSP a div with an Id and I used ajax, like that:
    function ajaxFunction()
              var xmlhttp;
              if (window.XMLHttpRequest)
              xmlhttp=new XMLHttpRequest();
              else if (window.ActiveXObject)
              // code for IE6, IE5
              xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
              else
              alert("Your browser does not support XMLHTTP!");
              xmlhttp.onreadystatechange=function()
                                                      if( xmlhttp.readyState==4 )
                                                           document.getElementById("tabelaResponsaveis").innerHTML = xmlhttp.responseText;
         var resp = "<f:invokeUrl var='solicitacao' methodName='getResponsaveis'/>";
         xmlhttp.open("POST",resp,true);
         xmlhttp.send(null);
    getResponsaveis is a method inside my BPM that returns a HTML code (the table HTML code with all the information that I need to show.
    I Hope to help
    Thanks Marcos

  • How to display on the graph three or more waveforms where time scale is not an index of array but a real time

    How to display on the graph three or more waveforms where time scale is not an index of array but a real time:
    I measure three voltages Va, Vb, and Vc on my Test stands every 3sec. So I’m building four arrays (Va, Vb, Vc, Time) and combine all in one.
    Time
    Va
    Vb
    Vc
    0
    5
    3.5
    2.8
    3
    4.9
    3.6
    2.9
    6
    4.8
    3.8
    2.1
    Now I need to show on the graph in which scale X is “Voltage” and scale Y is “Time”.
    How can I do it?
    Thanks a lot,
    Boris

    Hi, thanks all your reply.
    You may find "points_to_bar_graph.vi" from this website, I find it by this way.
    I will ask a stupid question: I don't have any photo processing software, how can I save the vi into a picture format?
    So here I just paste it into word document.
    Attachments:
    question.doc ‏520 KB
    points_to_bar_graph.vi ‏62 KB

  • How to Display Heading for TREE Structure (report)

    hi,
         tell me how display the heading for the TREE Report.
    With Regards,
    Shakthi Raj N.

    Hi,
    If you are using object oriented approach for developing the Tree report, then you can use below shown example for creating header for the report.
      first create tree control
      CREATE OBJECT TREE1
        EXPORTING
            PARENT              = G_CONTAINER_OBJECT
            NODE_SELECTION_MODE = CL_GUI_COLUMN_TREE=>NODE_SEL_MODE_SINGLE
            ITEM_SELECTION      = ''
            NO_HTML_HEADER      = ''
            NO_TOOLBAR          = ''
        EXCEPTIONS
            CNTL_ERROR                   = 1
            CNTL_SYSTEM_ERROR            = 2
            CREATE_ERROR                 = 3
            LIFETIME_ERROR               = 4
            ILLEGAL_NODE_SELECTION_MODE  = 5
            FAILED                       = 6
            ILLEGAL_COLUMN_NAME          = 7.
      CLEAR GT_HEADER.
      GT_HEADER-TYP = 'H'.
      GT_HEADER-INFO = 'Output'.
      APPEND GT_HEADER.
      CLEAR GT_HEADER.
      GT_HEADER-TYP = 'S'.
      GT_HEADER-KEY = 'Display'.
      GT_HEADER-INFO = 'Report'.
      APPEND GT_HEADER.
    then create empty tree-control
      CALL METHOD TREE1->SET_TABLE_FOR_FIRST_DISPLAY
              EXPORTING
                   IS_HIERARCHY_HEADER  = G_HIERARCHY_HEADER
                   I_BACKGROUND_ID      = 'ALV_BACKGROUND'
                   IT_LIST_COMMENTARY   = GT_HEADER[]
              CHANGING
                   IT_OUTTAB            = GT_SPFLI[]    "empty table
                   IT_FIELDCATALOG      = GT_FIELDCAT_LVC[].
    In this way header can be given for Tree report.
    Hope this answers your query.
    Regards,
    Brajvir

Maybe you are looking for