How to Flex tree control using folder click event  to pass coldfusion to get data from dynamiclly ?

Hi friends.........
            Iam using flex tree control data coming from coldfusion file to display grid. As i click the tree folder to change the data from dynamic from grid.
How to pass the folder id from coldfusion file.. Is it possible ?.. Means give any example please....
Any One Help Me......
With Regards.,
Lingu.......

When you set the dataProvider for your tree control, you actually pass an array or arraycollection or whatever to that property. The array contains objects coming from your server, right? Each object should contain a property with the folder id, something like:
var arr:Array = [{id: 1, folderID: 34, name: "..."}, {id: 2, folderID: 4, name: "..."}, ...];
Now, when you click an item in your tree or your dataGrid, you can access the folder id by:
myTree.selectedItem.folderID
Hope this helps
Dany

Similar Messages

  • Flex tree control expanditem dynamically..?

    Hi All.,
               I have using tree control using to display. when i pass the data with folder id dynamically  to expanding particular child node of tree.
        How to extarct tree with dynamic...?
    Below sample coding.....
    <mx:tree id="folderTree" />
    folderid=2618;
         callLater(expandTree, [folderid]);
         private function expandTree(folderid: Object) : void
                    folderTree.expandChildrenOf(folderTree.getChildAt(0), true);
                    folderTree.selectedItem = folderid;
    but not extracting tree.
    anyone help this problem
    With Regards.,
    Lings

    Thanks buddy for the answer.
    Unfortunately the answer came after quite long time of posting the message. Anyway I was able to open a tree on demand using HttpService and due to my new requirement I changed it to RemoteObject.
    I my latest change I am able to populate tree nodes on demand and also the same solution if getting update from server via JMS using Consumer object.
    I kind a like this solution because it took me good amount of effort to find the right solution.
    If any one is intersted the he/she can reply to the post and I can provide code here or may at some location so that it can be easily downloaded.
    The solution is Flex-Grails combination.
    Thanks everybody.

  • Populate flex tree control on demand using HTTPService (Flex 3)

    First, I am sorry if the same post is already posted here but after spending 30 minutes or may be more I could not find the solution.
    By the way I have two problems. 1.) I am new to flex which I know if my own problem and soon I will handle it.
    2.) This is major problem for me. I have to populate Tree control from database and I used HTTPService to get the data from database.
    I created a object of HTTPService and on load of Tree control I am calling a function which calls the HTTP URL and returns me the first level of node for my Tree.
    When I click on any node a function is called again using HTTPService and result is appended to the currently selected node. The same goes until n level and it works fine. I was happy with my results. I am stuck in new problem. The problem is if the tree is already populated on my browser and I make some add/update/delete any node or child node, the flex doesn't make a call to HTTP URL and I am not getting updated data.
    The mxml code is below (this code has some extra things too).
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    layout="vertical"  backgroundGradientAlphas="[1.0, 1.0]"
    backgroundGradientColors="[#000000, #868686]" >
    <mx:Script>
      <![CDATA[
       import mx.utils.StringUtil;
       import mx.rpc.http.HTTPService;
       import mx.events.ListEvent;
       import mx.binding.utils.BindingUtils;
       import mx.controls.Alert;
       import mx.rpc.events.FaultEvent;
       import mx.collections.XMLListCollection;
       import mx.utils.ObjectProxy;
       import mx.collections.ArrayCollection;
       import mx.rpc.events.ResultEvent;
       import mx.utils.ArrayUtil;
       [Bindable]
       public var datalist:XMLListCollection = new XMLListCollection();
       [Bindable]
       public var xmlFromDatabase:HTTPService=new HTTPService();
       [Bindable]
       private var xmlForChildren:HTTPService;
       private function resultHandler( event:ResultEvent ):void
           var x:XML = event.result as XML;   
           var xl:XMLList = XMLList( x );
       private function faultHandler( event:FaultEvent ):void
        Alert.show(event.message.toString());
       private function display():void
        var params:Object = {};
        params["parent"] = "0";
        xmlFromDatabase.url = "http://localhost:8080/GrailsFlex/department/tree";
        xmlFromDatabase.method = "GET";
        xmlFromDatabase.resultFormat = "e4x";
        xmlFromDatabase.useProxy = false;
        xmlFromDatabase.send(params);
        xmlFromDatabase.addEventListener(ResultEvent.RESULT,displyTree,false,0,false);
       private function displyTree(event:ResultEvent):void
        XMLtree1.dataProvider =  event.result;
        XMLtree1.labelField = "@name";
       private function getChilds(event:ListEvent):void
        try
         var xmlTree:Tree = event.currentTarget as Tree;
         var node:XML = xmlTree.selectedItem as XML
         var params:Object = {};
         params["parent"] = node.@id;
         xmlForChildren = new HTTPService();
         xmlForChildren.url = "http://localhost:8080/GrailsFlex/department/tree";
         xmlForChildren.method = "GET";
         xmlForChildren.resultFormat = "e4x";
         xmlForChildren.useProxy = false;
         xmlForChildren.send(params);
         xmlForChildren.addEventListener(ResultEvent.RESULT,appendChild,false,0,false);
         xmlForChildren.addEventListener(ListEvent.ITEM_CLICK,getChilds,false,0,false);
        catch (E:Error)
         Alert.show("getChilds Error:-- " + E.message);
       private function deleteTreeNode(xmlItem:XML):void
        var xmlParent:XML = XML(xmlItem).parent();
        if (xmlParent.@parent == null || StringUtil.trim(xmlParent.@parent) == "")
         xmlParent.@parent = "0";
        if (xmlParent.@parent != "0")
         //Recursive call until I get reach to children of root node
         deleteTreeNode(xmlParent);
        else
         // Now I am at root.
         var xmlRoot:XML = XML(xmlParent).parent();
         var bActualRoot:Boolean = false;
         if (xmlRoot == null)
          xmlRoot = xmlParent;
          bActualRoot = true;
         if (bActualRoot)
          if (xmlRoot.@parent == "0")
           try
            for each (var xl:XML in xmlParent.children())
             if (xl.@name != xmlItem.@name)
              for (var cn:int=xl.children().length()-1; cn >=0; cn--)
               delete xl.children()[cn];
           catch (ex:Error)
            Alert.show("error Real Root: " + ex.toString());
         else
          for each (var nodexm:XML in xmlRoot.children() )
           if (nodexm.@name != xmlParent.@name )
            try
             for (var cu:int=nodexm.children().length()-1; cu >=0; cu--)
              delete nodexm.children()[cu];
            catch (ex:Error)
             Alert.show("error No Real Root: " + ex.toString());
       private function appendChild(event:ResultEvent):void
        var node:XML = event.result as XML
        var sItem: XML = XMLtree1.selectedItem as XML;
        if (sItem.children().length() > 0)
         delete sItem.children();
        for(var i:int=0; i < node.children().length(); i++)
                        var item:XML = node.children()[i];
                        XMLtree1.selectedItem.appendChild(item);
                        XMLtree1.expandItem(XMLtree1.selectedItem,true,true);
        deleteTreeNode(XML(XMLtree1.selectedItem));
      ]]>
    </mx:Script>
    <mx:Tree id="XMLtree1" width="350" height="470"
          showRoot="false" creationComplete="display()" itemClick="getChilds(event)"  />
    </mx:Application>
    Thanks in advance

    Thanks buddy for the answer.
    Unfortunately the answer came after quite long time of posting the message. Anyway I was able to open a tree on demand using HttpService and due to my new requirement I changed it to RemoteObject.
    I my latest change I am able to populate tree nodes on demand and also the same solution if getting update from server via JMS using Consumer object.
    I kind a like this solution because it took me good amount of effort to find the right solution.
    If any one is intersted the he/she can reply to the post and I can provide code here or may at some location so that it can be easily downloaded.
    The solution is Flex-Grails combination.
    Thanks everybody.

  • Tree controle using abap oops

    Hi,
    I need a sample programe on Alv Tree controle using  opps
    Regards,
    Madhu.

    This method does not need a seperate screen but a selection screen is must.
    Data:
    dock_container type ref to cl_gui_docking_container,
    tree1 type ref to cl_gui_alv_tree_simple.
    *A docking container does not explicitly need a screen for it.It can be
    *placed on the selection screen itself.Here we are using the screen
    *which is used for the alvgrid.
    *First create a docking container with dock at left
    if dock_container is initial.
    create object dock_container
    exporting
    * PARENT =
    repid = g_repid
    dynnr = g_dynnr
    side = dock_container->dock_at_left
    extension = 300
    * STYLE =
    * LIFETIME = lifetime_default
    * CAPTION = 'jkhbnjkhk'
    * METRIC = 4
    * RATIO = 80
    * NO_AUTODEF_PROGID_DYNNR =
    name = 'dockkkkkk'
    * EXCEPTIONS
    * CNTL_ERROR = 1
    * CNTL_SYSTEM_ERROR = 2
    * CREATE_ERROR = 3
    * LIFETIME_ERROR = 4
    * LIFETIME_DYNPRO_DYNPRO_LINK = 5
    * others = 6
    endif.
    *Secondly create the field cat for the alv to be disp in dock container
    call function 'LVC_FIELDCATALOG_MERGE'
    exporting
    * I_BUFFER_ACTIVE =
    i_structure_name = 'ZC9_STRUCT'
    * I_CLIENT_NEVER_DISPLAY = 'X'
    * I_BYPASSING_BUFFER =
    changing
    ct_fieldcat = i_fcat[]
    * EXCEPTIONS
    * INCONSISTENT_INTERFACE = 1
    * PROGRAM_ERROR = 2
    * OTHERS = 3
    if tree1 is initial.
    *Thirdly create the tree1 object for the ALV with parent as docking
    *container
    create object tree1
    exporting
    * I_LIFETIME =
    i_parent = dock_container
    * I_SHELLSTYLE =
    * I_NODE_SELECTION_MODE =
    *cl_gui_column_Tree=>NODE_SEL_MODE_SINGLE
    * I_HIDE_SELECTION =
    * I_ITEM_SELECTION = 'X'
    * I_NO_TOOLBAR =
    i_no_html_header = ''
    * I_PRINT =
    * 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
    * others = 8
    *Finally create a tree with the below method. (Sort table need to be *passed)
    call method tree1->set_table_for_first_display
    exporting
    * I_BYPASSING_BUFFER =
    * I_BUFFER_ACTIVE =
    * I_CONSISTENCY_CHECK =
    i_structure_name = 'ZC9_STRUCT'
    it_list_commentary = pt_list_commentary
    i_logo = l_logo
    * IS_VARIANT =
    * I_SAVE =
    * I_DEFAULT = 'X'
    is_layout = gs_layout_tree
    * IS_PRINT =
    * IT_SPECIAL_GROUPS =
    * IT_TOOLBAR_EXCLUDING =
    * IT_HYPERLINK =
    * IT_ALV_GRAPHICS =
    * IT_EXCEPT_QINFO =
    changing
    it_outtab = itab[]
    * it_fieldcatalog = i_fcat1[]
    it_sort = gt_sort_grid[]

  • How can i get data from another database SQL Server use database link from

    I have a database link from Oracle connect to SQL Server database with user cdit connect default database NorthWind.How can I get data from another database(this database in this SQL Server use this database link)?

    hi,
    u should see following documentation:
    Oracle9i Heterogeneous Connectivity Administrator's Guide
    Release 1 (9.0.1)
    Part Number A88789_01
    in it u just go to chapter no. 4 (using the gateway),,u'll find ur answer there.
    regards
    umar

  • How to get data from Oracle using Native SQL in SAP.. Problem with date

    Hi Masters.
    I'm trying to get data from an Oracle DB. I was able to connect to Oracle using tcode DBCO. The connetion works fine
    I wrote this code and it works fine without the statement of where date > '01-09-2010'
    But i need that statement on the select. I read a lot about this issue, but no answer.
    My code is (this code is in SAP ECC 6.0)
    DATA: BEGIN OF datos OCCURS 0,
          id_numeric(10),
          component_name(40),
          comuna(10),
          record_id(10),
          status,
          sampled_date(10),
          END OF datos.
    DATA: c TYPE cursor.
    EXEC SQL.
      connect to 'LIM' as 'MYDB'
    ENDEXEC.
    EXEC SQL.
      SET CONNECTION 'MYDB'
    ENDEXEC.
    EXEC SQL PERFORMING loop_output.
      SELECT ID_NUMERIC, COMPONENT_NAME, COMUNA, RECORD_ID, STATUS, SAMPLED_DATE
      into :datos from lims.SAMP_TEST_RESULT
      where     date > '01-09-2010'
    ENDEXEC.
    EXEC SQL.
      disconnect 'MYDB'
    ENDEXEC.
    How can i get the data from that date?? If i delete the where statemet, the program works well, it takes 30 mins and show all the data, I just need the data from that date.
    Any help
    Regards

    Please refer the example in this link which deals with Oracle date format.
    You can finnd a command DECODE which is used for date formats. If you have a look at whole theory then you will get an idea.
    Link:[Bulk insert SQL command to transfer data from SAP to Oracle|http://sap.ittoolbox.com/groups/technical-functional/sap-dev/bulk-insert-sql-command-to-transfer-data-from-sap-to-oracle-cl_sql_connection-3780804]

  • How do i get data from a structure using join?

    hi,
    what is the actual use of a structure.?
    my problem is :
    KUAGV is an existing STRUCTURE. it has got one fields each which links to MARA, AND VBKD tables. i want to fetch all related information from KUAGV, mara, vbkd . which is the better way : using joins or views or anything else? how do i
    get data from a structure using join?

    structure temporarily holds  any data passed to it dynamically throughout the runtime but doesnot store it permanently. so
    a structure cannot be included in a join.so instead of incuding structure KUAGV's field in a join 
    search the transparent table in which same field are present and  use it in join.
    A structure if created in DDIC(Data Dictionary) is a global DATA STRUCTURE which is used to group related information, for example you would group all the details of your bank account into a structure BANK_ACCOUNT that contains fields like account_Id, account_holder_name etc.
    If you create a structure in your program then it is local to your program. So you use this structure to create data holders of this DATA TYPE to hold data in your program.
    Edited by: suja thomas on Feb 11, 2008 6:24 AM
    Edited by: suja thomas on Feb 11, 2008 6:31 AM

  • How to get data from a USB-UIRT device using Labview?

    How to get data from a USB-UIRT device using Labview?
    I'm trying to get data from a USB-UIRT device, is it posible with Labview?
    I really appreciate your help, 
    thanks

    You may want to contact the developer of the device for the API and DLL.
    http://65.36.202.170/phpBB2/viewforum.php?f=3

  • HT4972 how come i can not use iOS 6 on my ipad 3 to get the youtube or pinerest app? it keeps giving me a message to use iOS5

    How come i can not use iOS 6 on my ipad 3 to get the youtube and pinerest app? i keep getting a message to update to iOS5 if i must use iOS5 how do i update to that one because it just took me 4 hours to figure out how to update to iOS6

    We have read that any apps that use the google map app (removed by ios6) will not work.  We have lost a great camping app for this reason, and have heard that some weather apps are not working either.  The company line we've been given is it's up to the app developer to rewrite their apps.  ***** doesn't it.

  • How to get data from live site using C# on grid view

    hi, how am I able to get data from a website and display it in a grid view ?
    Can anyone show me how I would do this? Thanks

    Hello,
    This post does not fit to this forum, read the
    stickies.
    Regards, Eyal Shilony

  • How to use RFC to get data from BW?

    Hi all, we need to get data from BW using RFC, I am not  familiar with BW and RFC, would you please give me some advice? Many thanks in advance!

    would you please bring your solution  to light here?
    thank you
    God's blessing
    Andreas

  • How to get data from subsites list of SharePoint 2010 in ssrs

    Hi,
    Can someone help me on this issue.
    I want to create a report using ssrs, I have some of the data in SQL and some of the data in sharepoint list.
    First I need to go to SQL and get the data from the table which contains URL for the subsite in sharepoint.
    after that I need to go to all the subsites and go to perticulat list in the subsites and get data from that list.
    for example, their is a top level site "abc"
    it contains sub site "123", "456","567", etc.. All this sub sites contain a list by name "Sample List", Now I need to go to that sub site list(Sample List) and get list-item column say "created By" which
    is created on particular date. 
    in my report, I need to print the sub site "url/Title" which comes from SQL database and list-item column  "Created By" of that sub site list "Sample List".
    I tried using subreport inside a report by using "Microsoft SharePoint List" as a datasource, but when it comes to real time we don't know how many subsites will be created, so we can't create a datasource for each subsite site.
    I guess we need to be using XML as a datasource, but how can we go to particular subsite in query while using XML, since all subsites have list with the same name ?
    I appreciate your help.
    Thank you,
    Kishore 

    Hi Kishore,
    SQL Server Reporting Services(SSRS) supports expression-based connection strings. This will help us to achieve the goal you mentioned in this case:
    Create a new report
    Create a Data Source in the report with the connection string like this:
    http://server/_vti_bin/lists.asmx (We use static connection string instead of expression-based connection string now, as it is not supported to get fields based on expression-based connection string in design time. We will change it to be expression-based
    connection string later)
    Create the data set(as you have done using XML query language). Please use list name instead of GUID in the listName parameter.
    Design the report(e.g. Add controls to the report)
    Now, let's change the connection string to be expression-based. First, please add a parameter to the report, move this parameter to top. This parameter is used to store the sub site name.
    Open the Data Source editor, set the connection string to be: ="http://server/" & Parameters!parameterCreatedInStep5.value & "_vti_bin/lists.asmx"
    In the main report, pass the sub site name to the report we created above via the parameter created in step5
    That is all.
    Anyway, this is actually a SQL Server Reporting Service(SSRS) question. You can get better support on this question from:
    http://social.technet.microsoft.com/Forums/en/sqlreportingservices/threads
    For more information about Expression-Based connection string, please see:
    http://msdn.microsoft.com/en-us/library/ms156450.aspx#Expressions
    If there is anything unclear, please feel free to ask.
    Thanks,
    Jinchun Chen
    Jin Chen - MSFT

  • Getting data from table control to the report program.

    Hi,
    I created a table control using report program and i am trying to enter data in the table control which i want to update in the DB table. How can i get the data entered in table control to the report program, so that i can update the DB table.
    Please help me finding out which variable will hold the data entered in table control(dynamically).

    hi,
    in your table control you give some name to that table control say it_cntrl.
    this only serves as the internal table to process the table control data.
    like u can write like this.
    loop at it_cntrl into wa_cntrl.   "wa_cntrl is work area of type it_cntrl table type
    .........        "do your functining
    end loop.
    any clarification get in touch
    thnks

  • How to get data from external source

    Hi experts,
       I want to get data from a different source e.g. from oracle. How can i get the data in BW??
    Sam

    Hi Samir
    there are different interfaces are available according to the source system.
    For Oracle source system you can use DB connect interface.
    you can extract data from several data sources to BI
    File Interface:: Using this interface, you can access files in ASCII format or CSV format
    DB Connect :: You use DB Connect to open other database connections in addition to the default connection and use these connections to transfer data from tables or views into a BI system.
    UD Connect :: UD Connect (Universal Data Connect) uses the Application Server J2EE connectivity to enable the reporting and analysis of both SAP and non-SAP data. Using UD Connect, you can access all relational and multidimensional data sources. UD Connect transfers the data as flat data.
    BI Service API ::
    Web Service for Staging ::You use the Web service to write the data from the source into the PSA. The transfer of data is controlled externally, without placing demand on BI.
    You can use this interface in conjunction with real-time data acquisition.
    Please assign points if this info helps.
    Regards
    Vivek..

  • I have developed one application software using Labview 8.5 in which i am collecting data from 5 temprature controllers on serial line.

    I have developed one application software using Labview 8.5 in which i am collecting data from 5 temprature controllers on serial line.
    This software is done and successfully installed on customer side.
    Now the customer want this software to be run on server and some fixed number of clients should access this with some login security.
    Is this fascility available with National Instruments in which i can installed this standalone application in server and allow some clients to access this with
    proper login?
    Regards,
    Vaibhav

    Yes, that is possible. Multiple clients can access the VI using Web Publishing tool and control the VI operation. However, only one client has the control of the VI at one instance. The client needs to right click on the web page displaying the front panel of the running VI and ask for control and then release control after the execution to let other clients to ask for the control subsequently. The LabVIEW VI needs to be running upon the server computer since closing LabVIEW also closes the Web Publishing server and disconnects the currently connected clients. 
    Please check this link http://zone.ni.com/devzone/cda/epd/p/id/3797
    You might want to create a stand alone executable for the same and then publish it over the internet for access by your desired clients. In that case, check this link http://digital.ni.com/public.nsf/allkb/3A0087DBE9D31F9286256B19000A2DAE?OpenDocument

Maybe you are looking for

  • USB stick won't mount on mac mini, it works perfectly on my macbook

    Both of them are osx lion. On the mini the led of the 256Mb USB stick (and still plenty of space!) gives short flashes every second, and won't mount on my desktop, in finder. It doesn't show up in disk utility. The mac mini is the most recent server

  • Wireless internet with mac and windows

    hi, I have a ibookG4 version 10.4.8 and i have a Windows XP computer with AT&T/AOL. I am trying to install wireless internet on my IbookG4. I purchase an AirPort Express Base Station (Model # A1084)and try to connect it to my G4 but it did not work.

  • Activated Acrobat 10 Pro requires re-activation

    I purchased CS5 about two months ago. After installing CS5 successfully, when I tried to install Acrobat 10 Pro, the installation won't accept the serial #. By the way, the PC had Acrobat 6 Pro on it which I uninstalled before installing CS5. Acrobat

  • Event Gateways in Multiserver Environment

    Hi all As a company we are looking to deploy a Flex application using 'push' messaging. The backend is a multiserver Coldfusion 8 setup behind a load balancer. My concern is around the multiserver setup while using event gateways. If a client consume

  • Business Process Monitering

    Hi,           My company has decided to implement BPM (Business Process Monitering). Can we implement BPM for the Template Project.            What is the difference between "Solution" and "Template project"? Please provide me helpful answers. Thanks