4 Replies Latest reply on Jan 5, 2009 9:26 AM by Newsgroup_User

    Dynamic HierarchicalData from MySQL?

    EWN-CMI Level 1
      I would like to populate an AdvancedDataGrid with HierarchicalData and would prefer not to generate xml. Does anyone out there have a good tutorial or can direct me to more information. It seems like all the tutorials use hard coded data. Thanks in advance.
        • 1. Re: Dynamic HierarchicalData from MySQL?
          EWN-CMI Level 1
          I found this resource, but I can't figure out how to get the .as class defined, I have tried putting the package in the src folder, a myComponents folder, etc but no luck. The import myComponents.* statement returns a 1172 error. Can anyone give me a clue of the proper file system for .as classes. I have been able to create custom components and get them into the app, but this must be different.

          http://www.adobe.com/livedocs/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context= LiveDocs_Book_Parts&file=about_dataproviders_057_15.html
          • 2. Re: Dynamic HierarchicalData from MySQL?
            Level 7

            "EWN-CMI" <webforumsuser@macromedia.com> wrote in message
            news:gjs817$b68$1@forums.macromedia.com...
            >I found this resource, but I can't figure out how to get the .as class
            >defined,
            > I have tried putting the package in the src folder, a myComponents folder,
            > etc
            > but no luck. The import myComponents.* statement returns a 1172 error.
            > Can
            > anyone give me a clue of the proper file system for .as classes. I have
            > been
            > able to create custom components and get them into the app, but this must
            > be
            > different.
            >
            >
            > http://www.adobe.com/livedocs/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.ht
            > m?context=LiveDocs_Book_Parts&file=about_dataproviders_057_15.html

            I don't see an import statement that's importing myComponents.* in that
            example. I don't know if you can use an ITreeDataDescriptor as the source
            for an AdvancedDataGrid. My understanding is that it wasn't good enough to
            work for ADG, which is why they wrote HierarchicalCollectionView.

            HTH;

            Amy


            • 3. Re: Dynamic HierarchicalData from MySQL?
              EWN-CMI Level 1
              Amy,

              At the bottom of the referenced page below the class is the app. Not real sure I want to use it, but can't find much else on Hierarchical, all this seems like a lot of work for a simple application. I have either 2 objects or 2 arrayCollections (whichever I want or need from the database). The first is simply a list of months retrieved from mySQL from my Activities table, and the second would be time, place, title of the Activity. I want to build a simple little grid that shows all the months of scheduled Activities and then one can drill down to see details. Thanks for the help.


              <?xml version="1.0" encoding="iso-8859-1"?>
              <!-- dpcontrols\CustDataDescriptor.mxml -->
              <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" xmlns="*" creationComplete="initCollections()">

              <mx:Script>
              <![CDATA[
              import mx.collections.*;
              import mx.controls.treeClasses.*;
              import myComponents.*;

              //Variables used to construct the ArrayCollection data provider
              //First top-level node and its children.
              • 4. Re: Dynamic HierarchicalData from MySQL?
                Level 7

                "EWN-CMI" <webforumsuser@macromedia.com> wrote in message
                news:gjt861$mue$1@forums.macromedia.com...
                > Amy,
                >
                > At the bottom of the referenced page below the class is the app. Not real
                > sure
                > I want to use it, but can't find much else on Hierarchical, all this seems
                > like
                > a lot of work for a simple application. I have either 2 objects or 2
                > arrayCollections (whichever I want or need from the database). The first
                > is
                > simply a list of months retrieved from mySQL from my Activities table, and
                > the
                > second would be time, place, title of the Activity. I want to build a
                > simple
                > little grid that shows all the months of scheduled Activities and then one
                > can
                > drill down to see details. Thanks for the help.
                >
                >
                > <?xml version="1.0" encoding="iso-8859-1"?>
                > <!-- dpcontrols\CustDataDescriptor.mxml -->
                > <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" xmlns="*"
                > creationComplete="initCollections()">
                >
                > <mx:Script>
                > <![CDATA[
                > import mx.collections.*;
                > import mx.controls.treeClasses.*;
                > import myComponents.*;
                >
                > //Variables used to construct the ArrayCollection data
                > provider
                > //First top-level node and its children.
                >

                You might find this example useful:
                http://flexdiary.blogspot.com/2008/09/groupingcollection-example-featuring.html

                GroupingCollection is a subclass of HierarchichalData, so a lot of the
                techniques I used there will apply to HierarchicalData.

                HTH;

                Amy