Dynamic XML to Datagrid

Hello to all,
I'm not a newbie in Actionscript 3 or in Flash, but I'm starting to use Flex, and maybe there is someting in a small scale missing for waht I want.
Here's what I have.
I've made a multiplayer game wich the objective is to answer questions (Math, Physics, Biology, etc...). You must select one of the four answers as fast as you can to end the game, and you will throw new questions to the opponents, if you are really quick.
This is done, now I have made a simple Flex application that can accept and store the questions to a database with PHP and MySQL. Has this will be used by several teachers to place the questions, it has to be simple. The application stores and retrieves some statistics for the numbers of questions that are stored.
The second part of this application is to visualize them, and alter them if needed. For that I made a datagrid with a small form beneath it. The objective is to select all questions or select an area and all questions of that area would populate the datagrid. I make a call through a HTTPService to a PHP that would reply XML data, and not a XML file.
making a raw call for the PHP the answer is correct, and I think that Flex is doing it to, but I don't seem to catch it and place it on the datagrid.
The XML is like this:
<list>
     <question>
          <id>
          <ask>
          <resp1>
          <resp2>
          <resp3>
          <resp4>
     </question>
</list>
The examples I saw so far only mention the retrieval of an xml file somewhere on the web or localy, never with data in the form of xml. Is it so different?
Other newbie question... does the command trace, works?
The code is attached if you care to see it.
Thanks.
Leonel
I a

never nest named functions. try:
import flash.events.Event;
import flash.net.URLRequest;
import fl.data.DataProvider;
var agendaXML:XML;
var agendaXmlLoader: URLLoader = new URLLoader();
agendaXmlLoader.addEventListener(Event.COMPLETE, agendaLoaded);
agendaXmlLoader.load(new URLRequest("http://dbmini.local/AZC/createXMLfromAZC.php"));
function agendaLoaded(evt:Event):void
          agendaXML = new XML(agendaXmlLoader.data);
          var componentProvider:DataProvider = new DataProvider();
          for (var i:uint = 0; i < agendaXML.verhaal.length(); i++)
                    componentProvider.addItem({Datum:agendaXML.verhaal[i].datum , Kop:agendaXML.verhaal[i].kop});
          agenda.dataProvider = componentProvider;
                    agenda.addEventListener(Event.CHANGE, agendaItemKlik);
function agendaItemKlik(event:Event):void
                              tekstVlak.text = agendaXML.verhaal[event.target.selectedIndex].tekst;

Similar Messages

  • DataGrid and Charts with dynamic XML

    First of all, forgive me if this has already been answered.
    The charting examples you see in the Flex documentation all
    use the same familiar ArrayCollection, and binds it to a DataGrid,
    Bar Chart, Area Chart, etc. However, all the grids and charts
    already know the structure of the data because the mxml contains
    field like yField="month" displayName="Month".
    What I am trying to do is make everything dynamic. I am
    converting an XML structure to an ArrayCollection and making it the
    dataProvider, but all I end up with is the column headers. The
    actual data doesn't populate the rows of the DataGrid.
    Beyond that. I want to take that same ArrayCollection I
    created from dynamic XML and use it as the dataProvider for any of
    the charts included with Flex Charting. Basically, a way to
    visualize the same data in any of the Flex charting components via
    a drop down.
    Has anybody got this to work?

    Without actually seeing the file, I would say check your
    content-type and make sure it is 'text/xml'.
    You can see examples of setting the content type here:
    http://labs.adobe.com/technologies/spry/samples/utils/query2xml.html
    You can sometimes tell just by viewing the dynamic XML in the
    browser. If it shows as a XML tree, all is well. If it is a big
    blob of text, it's probably content-type...
    Let us know...
    Don

  • How do I give the radio buttons a buttongroup and id dynamically as the datagrid is populated?

    I am using the following component as an item renderer for a
    <mx:DataGridColumn>
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:mx="
    http://www.adobe.com/2006/mxml"
    >
    <mx:HBox horizontalAlign="left" left="10">
    <mx:RadioButton />
    <mx:RadioButton />
    <mx:RadioButton />
    <mx:RadioButton />
    <mx:RadioButton />
    </mx:HBox>
    </mx:Canvas>
    How do I give the radio buttons a buttongroup and id
    dynamically as the datagrid is populated?

    "nikos101" <[email protected]> wrote in
    message
    news:g83gfl$m8o$[email protected]..
    >I am using the following component as an item renderer
    for a
    ><mx:DataGridColumn>
    >
    >
    > <?xml version="1.0" encoding="utf-8"?>
    > <mx:Canvas xmlns:mx="
    http://www.adobe.com/2006/mxml"
    >
    > <mx:HBox horizontalAlign="left" left="10">
    > <mx:RadioButton />
    > <mx:RadioButton />
    > <mx:RadioButton />
    > <mx:RadioButton />
    > <mx:RadioButton />
    > </mx:HBox>
    > </mx:Canvas>
    >
    > How do I give the radio buttons a buttongroup and id
    dynamically as the
    > datagrid is populated?
    What is your actual goal?

  • How can you update the content of a textfield in a dynamic xml form from MSAccess and VBA

    I am trying to use the code below to update a field in a dynamic xml form created by Livecycle.
    I can read the field content but cannot change it.
    What am I missing?
    Thanks
    R
    Sub test()
    Dim oPDF As AcroPDDoc
    Dim FileDestName As String
    Dim jso As Object
    Dim ofld As Object
        FileSrcName = "C:\Documents and Settings\My Documents\ADOBE Forms\NoVB.pdf"
        Set oPDF = CreateObject("AcroExch.PDDoc")
        Set jso = oPDF.GetJSObject
        Set ofld = jso.getfield("form1.TopForm.Header.Subform1.Contact")
        Debug.Print ofld.Value
         ofld.Value = "HHH"
        Debug.Print ofld.Value
    oPDF.Save PSsavefull, FileSrcName
    oPDF.Close
    Set jso = Nothing
    Set oPDF = Nothing
    End Sub

    You need to research the difference between an AcroForm and an XFA form.  You're trying to access a "Field" object, which is an AcroForm object.  An XFA form does not have fields, it has nodes.  The JavaScript you are using is specific to AcroForms and you are working with an XFA form.

  • Adobe Livecycle Designer ES 2 - Adobe Dynamic XML Forms?

    How can you convert a dynamic XML form design in a static PDF Form design? I tried to save a dynamic XML Form as a static PDF Form, and then tried to preview it in Designer but the layout change scripts were working which should work only for dynamic xml forms and not for the static pdf forms. Please suggest another way to do it. Thanks in advance.

    You use Master Pages to set layout that you want to use on multiple pages.
    Design what you want in a Master Page and then assign it to the pages you want in Object>Pagination>Place: and choose On Page> whatever you called your Master Page.

  • Adobe Reader for Android to work with dynamic XML PDF forms?

    Any possibility that Reader for Android will ever work with dynamic XML PDF forms created by Abobe Acrobat Pro?

    GoodReader ($4.99), ezPDF Reader ($2.99) and PDF Expert ($9.99) are well rated and support many more features.
    Here a link for your reference: http://indesignsecrets.com/for-interactive-pdf-not-all-readers-are-equal.php

  • Build a web gallery with amazing flash slideshows with dynamic XML files

    Build a web gallery with amazing flash slideshows with dynamic XML files
    Screenshot:
    Features
    Features
    Transitions, zooming and panning effect You can  choose from  Random, Wipe from Left, Fade to White, Cross Expansion and  other 60-plus  transition effects. Zooming and panning effect is  optional for advanced flash  templates.
    XML-driven This flash slideshow are XML-driven. The XML  document allows more personalized controls over the flash.
    Auto-playback and repeat mode The flash slideshow will play  automatically after preloading, and it can repeat playback.
    Dynamic customization Besides XML control, the  advanced  templates provide many more custom options, so that you can  create slideshow  that fits into your existing web design: width ,  height, border color,  background color, thumbnail size, etc. More about  dynamic customization
    Usage and demo visit: http://webdesigndevelopment.blog.com...swf-xml-files/

    Please excuse the bump...
    Anyone with a LR flash gallery that starts with slideshow in play mode?
    Can it even be set to do this?
    The only code in the style.xml that looks like it might be realted is line 12 <playOptions playMode="pause"/>, changing that to "play" does nothing.
    Thanks,
    Donnie

  • How can i exclude information pages from being printed in a dynamic XML form?

    Hi there,
    i am building a dynamic XML form in Adobe LiveCycle Designer ES2.
    In this form there are pages with information that help the end user fill out the form, but to use - those who process the forms after they have been sent to us - these pages with information are irrelevant.
    Is there a way to tell the form to omit these pages when printing.
    Currently i have set the pages mentioned to be only visable on-screen.  But doing so results in an empty page being printed (only the master page information is visable.)
    Any ideas how i can solve this issue?
    Thank you.

    Create a new master page and set that page to visible screen only. Set your subforms to use that master.

  • Dynamic XML TAGS in PL/SQL

    Hi I wish to have dynamic xml tags in pl/sql e.g. say i have a table xml_table with xml_tag and tag_value as two columns. Let us say it has a rows
    XML_TAG = timezone
    TAG_VALUE = UK
    I want the output in the following format
    <timezone>UK</timezone>.
    Any ideas how to achieve it using ORACLE functions and not concatenate <> to the columns? Help would be much appreciated.

    This is a forum discussing questions related to Oracle Portal. I'd recommend you to take a look at XDB and XSQL, on Oracle's Web site at http://otn.oracle.com.
    Hope it helps,
    Peter

  • How to set boundry value in dynamic rows in datagrid

    hi friends,
    I am new to flex.i want to add dynamic rows to datagrid that means.once i enter the first record i want to press tab button then it will automatically  go to the second row.and update the record continuously.once it reach the maximum value means the next row will not be edit.
    mxkimum value =10000
    from value            to value        percentage
    0.01                        2000             10
    2000                         8000           20
    8000                        10000               30
    after it reach 10000 next row will not edit,this is i want how i do this please help.
    If any suggession tel
    thanks
    B.venkatesan

    Hi,
    As Armin said use the following:
    wdContext.nodeXXX().currentXXXElement().setAttributeValue("attributeName", value)
    Here you give the value as value of simpleType and not its description.
    thanks & regards,
    Manoj

  • Adobe LiveCycle Dynamic XML forms & Apple iPad

    Are Adobe LiveCycle Dynamic XML forms viewable/useable by Apple iPad and Apple phone or other mobile devices? 

    According to Adobe, you can with LiveCycle ES4. At least, that's how I read their blog post on ES4 Mobile forms support.
    Of course, there have been several discussions started about this in the Adobe forums.
    Re: Unable to view the form in Mobile which was created using LiveCycle
    Re: I created a form using Adobe Livecycle, but I cannot open the form on Ipad or Samsung tablet pc.
    Re: Trouble using form on Android and/or iOS devices
    Re: help help...Making existing livecycle fillable form mobile(ios/android adobe reader) compatible
    Hope these help.

  • Dynamic XML PDF not importing fields

    I have a PDF developed in Livecycle and saved as a dynamic XML.
    My database is MS Access and from this I've exported a query saved as an XML file, a XSD schema and an XSL stylesheet. (files attached)
    I'm trying to populate the PDF from the above mentioned files client-side. I have the fields set up to display in a table with repeating rows.
    It seems that I've set everything up okay and I get no error generated in the log file when I preview the PDF in Livecycle, but, the fields are not
    being generated.
    I suspect maybe this is because I don't have the nested forms set up properly for a flowed subform. But I should get at least the first row generated
    shouldn't I, if it is reading the nodes in the XML?
    Attached is (a mock-up) of the PDF along with the XML, XSD and XLS. This form should flow to other pages when dynamically built and I'm hoping to
    display the header on each page (the header will be on the Master Page -- it will contain site links, etc.)
    I hope to not only import data to a PDF this way but also to export fields from the PDF in the same way for database edits...
    Can anyone tell me what I'm doing wrong in the attached?
    And, on another note... do all of the above need to be in the same folder together on the server or can I put the PDF in one folder and the XML, XSD
    and XLS a different folder? (Or the PDF and XLS in the same folder and XML and XSD files in a different folder, etc.)...
    Thanks for any reponses on this.
    - ed
    PS: Below is the XSD schema code (since I can only upload the 3 other files here)
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:od="urn:schemas-microsoft-com:officedata">
    <xsd:element name="dataroot">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element ref="WMS_x0020_BMI_x0020_Percentile_x0020_ZScore" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    <xsd:attribute name="generated" type="xsd:dateTime"/>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="WMS_x0020_BMI_x0020_Percentile_x0020_ZScore">
    <xsd:annotation>
    <xsd:appinfo/>
    </xsd:annotation>
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="LastName" minOccurs="0" od:jetType="text" od:sqlSType="nvarchar">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="255"/>
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="Firstname" minOccurs="0" od:jetType="text" od:sqlSType="nvarchar">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="255"/>
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="PreHeight" minOccurs="0" od:jetType="text" od:sqlSType="nvarchar">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="50"/>
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="PreWeight" minOccurs="0" od:jetType="text" od:sqlSType="nvarchar">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:maxLength value="50"/>
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="PreBMI" minOccurs="0" od:jetType="double" od:sqlSType="float" type="xsd:double"/>
    <xsd:element name="PreBMIPercentile" minOccurs="0" od:jetType="double" od:sqlSType="float" type="xsd:double"/>
    <xsd:element name="PreZScore" minOccurs="0" od:jetType="double" od:sqlSType="float" type="xsd:double"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>

    Sorry for the delay in replying to this post. I got stuck at a friend's from the weekend snow we had... and am finally back on my own computer.
    Just before leaving Friday I found the problem with the form not displaying data fields read from the XML.
    It's a bit embarrassing to admit but, per Steve's instruction here to change the form preview properties (file/form properties) (thanks, Steve!) - I changed the preview from 'print one-sided' to 'interactive' and noticed that I had not set up the link to the XML under 'Data File'. Duh! So, it is reading the data from the XML now.
    However... For the form to display, I had to (under 'connection properties) take the XSLT file off. Under 'Connection Properties' the form is set up as XML Schema with the link to the XSD set up.
    The problem now is that a few of the dynamic fields are numbers. These number fields in the database only have two digits to the right of the decimal point (as in 93.79) but when the form loads these fields in the table in preview mode these fields contain 8 digits to the right of the decimal point (as in 93.79362082). I don't know why this is except that maybe it is because it's no longer reading from the XSLT file. All I want it to do is read the field exactly as it is in the database...
    The table on the form doesn't display as it should either. The table expands with the rows its presenting but this runs to the very bottom of the page and doesn't flow to the next page. I've tried changing the size of the 'root' form on the Master page as well as the size of the 'parent' subform of the table subform but the table still runs to the bottom of the page... I'll keep playing around with this until I fix it unless someone can point me in the right direction...
    Thanks for any leads on this...
    (new corrected file attached)
    Graham, this stuff really is interesting! These handful of files working together to build a dynamic PDF, reading the database XSD schema, an XML file and the XSL file as well as throwing in some Javascript functions is really cool... I'm also (hopefully) planning to have Cold Fusion query the database, depending on the login person's admin privilages, parse the fields from the database and build the XML file from this data 'on the fly' at login... Quite a lot going on in the background here to build the PDF! (I wish I could answer your question about the stylesheet but, obviously from the above, I'm a novice at this - I'm new at this and trying to grope my way around this stuff in the dark. These forums have been helpful as well as googling questions, but, there is still a learning curve here. I'm pretty rough with Javascript as well and that's a big feature of this stuff...)
    Thanks to anyone for direction on getting this file to display properly and the number fields to show the same as in database...
    - ed

  • Dynamic XML with Weblogic ?

    hello all !!
    May be this question is already answered, and sorry for that, but here again !
    I am trying to use Weblogic server, in order to process XML files, this files
    make a query to my Oracle Data Base, Before this I was using Cocoon (apache) to
    generate the dynamic XML with the query's result, is there a way to make the same
    thing with Weblogic ? anybody know how to do it ? do yu have a simple example
    ? here is a sample code that I use with cocoon.
    <?xml version="1.0" ?>
    <?cocoon-process type="xsp"?>
    <xsp:page language="java" xmlns:sql="http://www.apache.org/1999/SQL"
    xmlns:xsp="http://www.apache.org/1999/XSP/Core"
    xmlns:request="http://www.apache.org/1999/XSP/Request">
    <page title="SQL Search Results">
    <sql:execute-query>
    <sql:driver>oracle.jdbc.driver.OracleDriver</sql:driver>
    <sql:dburl>jdbc:oracle:thin:@IP_Address:1521:cta</sql:dburl>
    <sql:username>User</sql:username>
    <sql:password>Password</sql:password>
    <sql:doc-element>My_table</sql:doc-element>
    <sql:row-element>record</sql:row-element>
    <sql:query>select * from My_table</sql:query>
    </sql:execute-query>
    </page>
    </xsp:page>
    Thanks a lot for your help !
    Gustavo Mejia
    INFOTEC

    Since Cocoon is a servlet, just install it in Weblogic.
    "Gustavo Mejia" <[email protected]> wrote in message
    news:3b5ca3fa$[email protected]..
    >
    hello all !!
    May be this question is already answered, and sorry for that, but hereagain !
    >
    I am trying to use Weblogic server, in order to process XML files, thisfiles
    make a query to my Oracle Data Base, Before this I was using Cocoon(apache) to
    generate the dynamic XML with the query's result, is there a way to makethe same
    thing with Weblogic ? anybody know how to do it ? do yu have a simpleexample
    ? here is a sample code that I use with cocoon.
    <?xml version="1.0" ?>
    <?cocoon-process type="xsp"?>
    <xsp:page language="java" xmlns:sql="http://www.apache.org/1999/SQL"
    xmlns:xsp="http://www.apache.org/1999/XSP/Core"
    xmlns:request="http://www.apache.org/1999/XSP/Request">
    <page title="SQL Search Results">
    <sql:execute-query>
    <sql:driver>oracle.jdbc.driver.OracleDriver</sql:driver>
    <sql:dburl>jdbc:oracle:thin:@IP_Address:1521:cta</sql:dburl>
    <sql:username>User</sql:username>
    <sql:password>Password</sql:password>
    <sql:doc-element>My_table</sql:doc-element>
    <sql:row-element>record</sql:row-element>
    <sql:query>select * from My_table</sql:query>
    </sql:execute-query>
    </page>
    </xsp:page>
    Thanks a lot for your help !
    Gustavo Mejia
    INFOTEC

  • How to parse a dynamic xml in java

    I have to parse a dynamic xml document : the different TheItemNames and the racine are changing . So , can you help me with a code because to parse a xml document you must presents the racine and TheItemNames

    My previous post gives me an idea on how to use ArrayList of ArrayList as dynamic 2 dimensional array.
    More info bellow
    ArrayList rows = new ArrayList()
    ArrayList columns_of_row0 = new ArrayList()
    rows.insertAt(0) = columns_of_row0;
    ArrayList columns_of_row1 = new ArrayList()
    rows.insertAt(1) = columns_of_row1;and so on..
    You can't use the code exactly or similar way, it would depend on how this array grows in your application.
    But this and my previous post should give an idea on how to insert and retrieve elements from ArrayList when
    treated as 2 dimensional array.
    Hope this helps.

  • Runtime Error For Converting Static pdf to Dynamic Xml Form pdf

    Hi All,
    I am converting my static pdf to dynamic xml form pdf using Adoble Livecycle Designer ES 8.2 it is giving runtime error dialog.
    My static pdf size is 12MB and it contains 46 pages(mostly all pages will have images). Do we have any limitations for converting static pdf to dynamic xml form pdf ?
    Error message image file is attatched to this thread.
    Can any body please help me on this.
    Advance Thanks
    Prasad Sagala

    Hi Paul,
    With out dividing into smaller chunks, Do we have any other alternative?
    Because in my other pdf reports having more than 50 pages (in between 100-600). If i want do divide smaller chunks it will be the long process.
    Thanks
    Prasad Sagala

Maybe you are looking for