XML in Flex data

I'm passing in XML from a CFC data, works fine... Sure, I can see the data in debug mode, but the data do not work like it if data is built in Flex itself. I'm pulling in the XML data to use control "CheckBox State 3 tree" which can be downloaded from the exchange for Flex developers.

If the XML is created in Flex itself code control works very well. Here's how the XML data are created in Flex:

[Bindable]
public var folderList:XMLList =
<>
< State folder = "Schrödinger" label = "Documents Marketing" isBranch = "true" >
< State folder = "Schrödinger" isBranch = "true" label = 'Media, PR and Communications' >
< Status folder = "unchecked" isBranch = "false" label = "Article Reprint warnings" / >
< Status folder = "unchecked" isBranch = "false" label = "Reprints of Articles" / >
< Status folder = "unchecked" isBranch = "false" label = "Interviews and transcripts" / >
< Status folder = "unchecked" isBranch = "false" label = "Press kits" / >
< Status folder = "unchecked" isBranch = "false" label = "Press Releases" / >
< Status folder = "unchecked" isBranch = "false" label = "Quick Hits" / >
< Status folder = "unchecked" isBranch = "false" label = "Rep Talking Points" / > "
< Status folder = "unchecked" isBranch = "false" label = "Special updates" / >
< Status folder = "checked" isBranch = "false" label = "White papers" / >
< / case >
< State folder = "Schrödinger" isBranch = "true" label = "Forms and Applications" >
< Status folder = "unchecked" isBranch = "false" label = "Applications" / >
< Status folder = "checked" isBranch = "false" label = "Forms" / >
< / case >
< / case >
<>/.

[Bindable]
public var folderCollection:XMLListCollection;

private void init (): void {}
folderCollection = new XMLListCollection (folderList);
checkTree.dataProvider = folderCollection;
}


If I demand a break and look at the data in debug mode, I see that the content of the XMLListCollectionList folderCollection looks like this image: CLICK HERE TO SEE the XML data XML built in Flex

When I pass the data in Flex using a CFC, it comes as an XMLList object. I have therefore converted to an XMLListCollection and pass it to the component. Here is the code I use to do this, under the call to the CFC...

<? XML version = "1.0" encoding = "iso-8859-1? >
"" < mx:Canvas xmlns:mx = ' http://www.adobe.com/2006/mxml " height ="100% "width ="100% "creationComplete =" init () ">"

< mx:Script >
<! [CDATA]

Import mx.collections. *;
Import datamodels.allowedTablesModel;
import util. CheckTreeRenderer;
Import events.allowedTableEvent;

[Bindable]
public var allTablesList_1:XMLList;

[Bindable]
public var folderCollection:XMLListCollection;

private void init (): void {}
folderCollection = new XMLListCollection (allTablesList_1);
checkTree.dataProvider = folderCollection;
}


private function modTables (): void
{
modButton.visible = true;
Used to pause the applet so I can look at the data
}

[]] >
< / mx:Script >
< mx:Tree id = "checkTree" itemRenderer = util. "' LabelField CheckTreeRenderer ' = 'label' width ="100% "height ="100% "/ >

< mx:Button id = "modButton" fontFamily = "Arial" fontSize = "10" fontWeight = "bold" click = "modTables ()" "
label = "Edit table" visible = "true" x = "553,5" y = "428" width = "125" / >

< / mx:Canvas >


If I pass the data in a CFC data looks like the folowwing image when I stop it in Flex.
CLICK HERE TO SEE THE DATA PASSED IN TO A CFC

I don't see why the work of the component if I build data in applet verses passing via an XML stream. Any ideas?

Have an ordinary day...
KomputerMan ~ |  :-)

Adobe support...

"When you use a provider with a tree-based XML data you specify the label field, even if it is"label". The XML object includes the root, so you must define showRoot = "false". Remember that the tree does not, by default, the dynamic changes to the XML object. »

So all I had to do was change the label of the component of this:

to do this:

Just as an info... Adobe support is worth the cost if you are fairly new to Flex. I've been bending for about 9 months now and find their invaluable service!

Have an ordinary day...
KomputerMan ~ |  :-)

Tags: Flex

Similar Questions

  • Flex Data Services integrated into Oracle Web Service Proxy

    I am trying to invoke a service proxy web created with Oracle JDeveloper IDE via Flex Data Services.
    I created an assembler class and defined actionscript objects that are required to serialize web service data and then call the dataservice with the id provided in the datamanagement.config file.

    When I try to debug the application, the class of the assembler is not affected, I added a breakpoint in the class, but on beforehand the exception is already thrown.

    Appears in the following stackTrace:
    [Flex] Order receipt: TCCommand [Cmd: 0, MethodName: null, TrxID: 3.0]
    [Flex] Has started the transaction using jndi name: java: comp / UserTransaction
    [Flex] Transaction committed
    [Flex] Response of the AMF financial/RTMP serialization
    Version: 3
    (Order method = _error (0) trxId = 3)
    (Print object #0 'flex.messaging.messages.ErrorMessage')
    rootCause = null
    destination = "dossierCreation".
    headers = (1 item)
    correlationId = "823B7A23-8463-0D24-0D39-A7FF8080B3A7."
    faultString = "there is an error unhandled on the server. javax/xml/rpc/ServiceFactory.
    messageId = "DF26CC97-B619-EAB1-191F-3FF02B998D49."
    faultCode = "Server.Processing".
    timeToLive = 0.0
    extendedData = null
    faultDetail = null
    clientId = "DF26CC00-580E-7285-F10F-720471C6BBE5".
    timestamp = 1.192524481046E12
    body = null

    I found the problem, I had to configure JOTM in my tomcat server to allow transactions.

  • Reading XML using XSLT data

    I have a problem of reading xml using XSLT data. There is a CASE - 900000016, has two sequences. SEQ NO1 and NO2 SEQ. Each sequence has an activity. I try to display the info of the activity under corresponding sequences.

    SEQ 01

    Activity

    SEQ 02

    Activity

    This is the xml file.

    <? XML version = "1.0" encoding = "utf-8" standalone = "yes"? >
    < case >
    < EventList >
    < PAEvent >
    < CASENO > 900000016 < / CASENO >
    < > 01 SEQ_NO < / SEQ_NO >
    APPROVED < STATUS > < / STATUS >
    < REASON > < / REASON >
    < PR_NO > 506024 < / PR_NO >
    < SRV_BEG_DAT > 11/02/2010 < / SRV_BEG_DAT >
    < SRV_END_DAT > 11/02/2010 < / SRV_END_DAT >
    < / PAEvent >
    < PAEvent >
    < CASENO > 900000016 < / CASENO >
    < > 02 SEQ_NO < / SEQ_NO >
    APPROVED < STATUS > < / STATUS >
    < TYPE > < / TYPE >
    < REASON > < / REASON >
    < PR_NO > < / PR_NO >
    < SRV_BEG_DAT > 11/02/2010 < / SRV_BEG_DAT >
    < SRV_END_DAT > 28/02/2010 < / SRV_END_DAT >
    < / PAEvent >
    false < hasErrors > < / hasErrors >
    < / EventList >
    < ActivitiesList >
    < PAActivity >
    < CASE_NO > 900000016 < / CASE_NO >
    < > 01 SEQNO < / SEQNO >
    < ACTVTY_LN_NO > 03 < / ACTVTY_LN_NO >
    < ACTVTY_TYP >: < / ACTVTY_TYP >
    < UNIT_PRC > 16.2500 < / UNIT_PRC >
    < / PAActivity >
    < PAActivity >
    < CASE_NO > 900000016 < / CASE_NO >
    < > 02 SEQNO < / SEQNO >
    < ACTVTY_LN_NO > 01 < / ACTVTY_LN_NO >
    < ACTVTY_TYP > P < / ACTVTY_TYP >
    < UNIT_PRC > 0.0000 < / UNIT_PRC >
    < / PAActivity >
    false < hasErrors > < / hasErrors >
    < / ActivitiesList >
    < / Cases >


    XSLT code

    <? XML version = "1.0" encoding = "utf-8"? >
    < xsl: stylesheet version = "1.0" xmlns: xsl = "http://www.w3.org/1999/XSL/Transform" >
    < xsl: template match = "Case" >
    < div Id = "dvEvents" align = "center" >
    <!--list of events-->
    < table width = "75%" border = "0" >
    < style tr = "text-align: left;" background-color: gray; ">
    < td colspan = "8" class = "SmallBlackFontBolder" >
    < b > < /b > events
    < table >
    < /tr >
    < xsl: for-each select = "EventList/PAEvent" >
    < b >
    < class td = "SmallBlackFontBold" style = "" text-align: left; "width ="8% "> Seq No.: < table >"
    < class td = "SmallGreenFontBold" align = "left" width = "10%" >
    < xsl: value-of select = "SEQ_NO" / >
    < table >

    < class td = "SmallBlackFontBold" align = "left" width = "8%" > status: < table >
    < td align = "left" width = "11%" >
    < xsl: value-of select = "STATUS" / >
    < table >
    < /tr >

    < b >
    < td >
    <!--get the list of activities-->
    < xsl: for-each select = "Case/ActivitiesList/PAActivity" >
    < xsl: if test = "Case, EventList, PAEvent, SEQ_NO = case, ActivitiesList, PAActivity, SEQNO" >
    < table width = "75%" >
    < b >
    < class td = "SmallBlackFontBold" style = "" text-align: left; "width ="8% "> Seq No.: < table >"
    < class td = "SmallGreenFontBold" align = "left" width = "10%" >
    < xsl: value-of select = "Case, ActivitiesList, PAActivity, SEQNO" / >
    < table >
    Unit price < td >: < table >
    < td align = "left" width = "11%" >
    < xsl: value-of select = "Case, ActivitiesList, PAActivity, UNIT_PRC" / >
    < table >
    < /tr >
    < /table >
    < / xsl: if >
    < / xsl: foreach >
    <!--get the list of activities-->
    < table >
    < /tr >

    < b >
    < class td = "SmallBlackFontBold" align = "left" width = "8%" > reason: < table >
    < td align = "left" width = "20%" >
    < xsl: value-of select = "PAEvent/EventList/reason" / >
    < table >
    < td > < table >
    < td > < table >
    < class td = "SmallBlackFontBold" align = "left" width = "14%" > PR_NO: < table >
    < td align = "left" width = "18%" >
    < xsl: value-of select = "PAEvent/EventList/PR_NO" / >
    < table >
    < /tr >

    < / xsl: foreach >
    < /table >

    < / div >
    < / xsl: template >
    < / xsl: stylesheet >

    Published by: 837989 on April 25, 2013 14:13
  • Apply CSS to XML in AS3 data

    I know that this subject has been repeated several times, but despite having looked at a lot of discussions and web pages on the topic, I was not able to understand why mine does not work, I'm looking for help.

    Here is my code:

    CSS:

    @charset "utf-8";

    / * CSS document * /.

    {p}

    are-family: Arial;

    are-size: 25px;

    color: #000;

    }

    XML:
    <? XML version = "1.0" encoding = "utf-8"? >
    < tbContent >
    < slide > <! - 0 - >
    < title > contents < /title >
    content of < type > < / type >
    < content > <! [CDATA [< p > what is a Test of Mantoux skin? < /p >]]
    < p > how to administer a Mantoux skin Test < /p >
    < p > how to read a Mantoux skin Test < /p >
    < p > how to interpret the reading < /p >]] > < / content / >
    < image > Blank.jpg < / image >
    < popup > 0 < / popup >
    < reference > 0 < / reference >
    < / slide >
    < / tbContent >
    AS3:
    var container: content_mc = new content_mc();
    Implement xml file objects
    var xmlData:XML = new XML();
    XML.ignoreWhitespace = true;
    var xmlLoader:URLLoader = new URLLoader();
    External CSS document
    var cssLoader:URLLoader = new URLLoader();
    var cssRequest:URLRequest = new URLRequest ("css.css");
    var style: StyleSheet = new StyleSheet();
    cssLoader.load (cssRequest);
    cssLoader.addEventListener (Event.COMPLETE, onCSSComplete);
    function onCSSComplete(e:Event):void {}
    styles.parseCSS (cssLoader.data);
    xmlLoader.load (new URLRequest ("xml.xml"));
    xmlLoader.addEventListener (Event.COMPLETE, LoadXML);
    trace ("CSS has loaded.");
    }
    function LoadXML(e:Event):void {}
    xmlData = new XML (e.target.data);
    parseFile (xmlData);
    }
    function parseFile(xmlContent:XML):void {}
    stage.addChild (container);
    var content: TextField = new TextField();
    contents.styleSheet = styles;
    contents.htmlText = xmlContent.slide.content.text () [slide].
    contents.width = xW;
    contents.x = xSet.
    contents.y = ySet;
    contents.antiAliasType = "Advanced";
    contents.multiline = true;
    contents.autoSize = 'left ';
    contents.wordWrap = true;
    container.addChild (happy);
    }
    The text appears on the scene, but without formatting. I don't get any errors. If anyone can help with this it would be greatly appreciated.

    The default parser doesn't like the VAT statement charset in css:

    @charset "utf-8";

    Deletion of line of the file and you should be ok. Otherwise, you could write your own parser - or strip the statement on.

  • Flex Data Service and its content

    Hello
    Can someone tell me which folders and files you have on the flex data service after the installation.

    Thank you

    Sun

    You can Flex folder in flex.war
    Dim

  • Problem with StyleManager in Flex Data Services Project

    OK, weird stuff here. If you make a new base and the attempt to use StyleManager (to load comiles CSS when running) it works... in other words, it works:

    Mx.styles import. *;
    StyleManager.loadStyleDeclarations ("styles/test_1.swf")

    However, try to create a simple Flex Data Services project and use the same code and for some reasons, you do not see as StyleManager method loadStyleDeclarations, but everything seems to be there! still unknown, leave within the Flex Data Services project, you can call us StyleManager.as and see clearly that loadStyleDeclarations is here. Is this a bug or am I a horrible configuration problem? I tried this on another machine with similar results. Help would be greatly appreciated, at least to confirm others see the same problem...

    c

    OK, fixed it... you need to update of the SDS to 2.0.1 and Flex 2.0.1 update main course. Pretty obvious.

  • Flex Date time axis not showing the correct values

    <? XML version = "1.0" encoding = "utf-8"? >

    " < = xmlns:fx s:Application ' http://ns.Adobe.com/MXML/2009 "

    xmlns:s = "library://ns.adobe.com/flex/spark".

    xmlns:MX = "library://ns.adobe.com/flex/halo" width = "700" height = "500" >

    < fx:Declarations >

    <! - Place non-visual elements (e.g., services, items of value) here - >

    < / fx:Declarations >

    < fx:Script >

    <! [CDATA]

    import mx.collections.ArrayCollection;

    [Bindable]

    public var stockDataAC:ArrayCollection = new ArrayCollection ([] collection

    {date: "2005, 7, 27 ', nearby: 41,71},.

    {date: "2005, 7: 28", narrow: 42.21},.

    {date: "2005, 3: 29", narrow: 42.11},.

    {date: "2005, 1, 1 ', nearby: 42.71},.

    {date: "2005, 10, 2", nearby: 42.99},.

    ([ {date: "2005, 9, 3 ', nearby: 44}]);

    public void myParseFunction(s:String):Date {}

    / / Get an array of strings to the last comma-separated string.

    var a: Array = s.split(",");

    / / Create the new Date object. Subtract one from the month property.

    / / The month property is zero-based in Date constructor.

    var newDate:Date = new Date(a[0],a[1]-1,a[2]);

    return Nouvelle_date;

    }

    ]]>

    < / fx:Script >

    < mx:Panel title = "Example DateTimeAxis" height = "100%" width = "100%" >

    < mx:LineChart id = "mychart" height = "100%" width = "100%".

    paddingRight = paddingLeft = "5" '5 '.

    showDataTips = "true" dataProvider = "{stockDataAC}" >

    < mx:horizontalAxis >

    < mx:DateTimeAxis dataUnits = 'days' parseFunction = "myParseFunction" / >

    < / mx:horizontalAxis >

    < mx:verticalAxis >

    < mx:LinearAxis baseAtZero = "false" / >

    < / mx:verticalAxis >

    < mx:series >

    < yField = mx:LineSeries 'close' xField = "date" displayName = "AAPL" / >

    < / mx:series >

    < / mx:LineChart >

    < / mx:Panel >

    < / s:Application >

    the code above shows opposite values from date to date axis it is to say it should show 01/05 2 / 05 / 3 / 05 4/05 but its display 10/05 09/05 08/05 07/05 on the date axis.

    Help, please.

    I saw this bug on Adobe's JIRA so nothing much you can do for now DateTimeAxis is quite bugged.

    In passing, is it me or mx:datavisu is on the low priority these days? Maybe the team working on a version of spark?

    https://bugs.Adobe.com/jira/browse/FLEXDMV-2231

  • How to access the XML in Flex

    < user >

    < UID = "HR" dept >

    < user >

    mm < fname > < / fname >

    < Email > [email protected] < / email >

    < / user >

    < user >

    SSS < fname > < / fname >

    < Email > [email protected] < / email >

    < / user >

    < / dept >

    < UID = 'Finance' dept >

    < user >

    FFFF < fname > < / fname >

    < Email > [email protected] < / email >

    < / user >

    < user >

    www < fname > < / fname >

    < Email > [email protected] < / email >

    < / user >

    < / dept >

    < / users >

    using the HTTP service with access to the data

    This my user.xml file I want to display all the item in flex datagrid using the function navigator tab... each browser tab contains a grid of data for corresponding like HR, sales, Finance Dept

    the corresponding information will be displayed in the data grid

    first tab navigatore is

    HR-> grid of data such as fname, Email field

    Finance-> fname, E Mail

    Try this if you have problems and the way in which you want to change it:


    <>
    "xmlns:MX ="http://www.adobe.com/2006/mxml"
    Layout = "vertical".
    "" xmlns:local = "*".
    creationComplete = "init ()" > "


           
               
                    
                          mm
                          [email protected]
                    

                    
                          SSS
                          [email protected]
                    

               

               
                    
                          FFFF
                          [email protected]
                    

                    
                          www
                          [email protected]
                    

               

           

       

       
       
           
    dataProvider = "{myXML.dept}" > "
               

                   
                       
                           
                           
                       

                   

                       
           
       
       

    Kind regards

    Adrian

  • How to Append and update XML in flex

    I need help... I am developing a desktop using Flex and Air application.

    I would like to add and update the xml code by using this application. How can I add and update XML data?

    If the user gives input is recorded in an XML file. can someone tell me how to do this?


    Thanks in advance,

    Verhasselt

    You may need to set some variables outside the functions so that they are "global".

    If this post answers your question or assistance, please mark it as such.

  • Error creating New flex data services project

    Hello
    Error: Invalid server root. Flex - config.XML or company flex - services.xml must exist in the WEB-INF/flex folder in the root of the server.

    Try to create flex project with Weblogic8.1 as the server j2ee services data, but am getting the error above in the screen where I point to the root of the server.
    I deploy flex on weblogic.

    I'd appreciate any help.
    Thank you

    Sun

    Hello

    The root of the server must be the parent of the WEB - INF folder. So, in your case, I think that the root server must be:

    C:\bea81SP5\user_projects\applications\dcgsaApplication\dcgsAdaptersWeb

    Give that a shot and let me know if it works.

    Thank you

    NJ
    Flex Builder team

  • Problems with the Web Service using XML in Flex

    Hello

    I use a ColdFusion CFC, which is configured to generate an XML string. It runs on ColdFusion MX 6.1 and is configured as a remote web service. I tested the call and it returns the string XML fine when it is called from another method of Flex unfounded. My problem is this simple Flex application to call the same function via a service web, I wrote below. I cannot get to the exit results, keeps showing as NULL. I can't use the HTTP of Flex appeal for remote access because I'm not under MX7. Does anyone know what is wrong with my code? BTW, I would do the work of cross - domain.xml file to call the cfc, let me know if you want to test and I can add your domain name. Thank you!

    <? XML version = "1.0" encoding = "utf-8"? >
    "" < mx:Application xmlns:mx = ' http://www.adobe.com/2006/mxml ' layout = "absolute" >

    <! - set Web Service to get the XML data of course catalog - >
    < mx:WebService
    ID = "cd".
    "WSDL =" http://training.wonderware.com/components/courses.cfc?wsdl "
    Load = "CD.getCourseCatalogXML.Send ()" "
    showBusyCursor = "true" fault = "Alert.show (event.fault.message), 'Error' ' result =" cdResult (event) ">"
    < mx:operation name = "getCourseCatalogXML" resultFormat = "e4x" >
    < mx:request >
    < IDCalendrier > 3 < / IDCalendrier >
    < / mx:request >
    < / mx:operation >
    < / mx:WebService >

    < mx:Script >
    <! [CDATA]
    Import mx.controls.Alert;
    Import mx.rpc.events.ResultEvent;
    Import mx.rpc.events.FaultEvent;

    [Bindable]
    public var outputString:String

    public void cdResult(event:ResultEvent):void
    {
    outputString = event.result as String
    }
    []] >
    < / mx:Script >

    < mx:Canvas horizontalScrollPolicy = "off" verticalScrollPolicy = "off" >
    < mx:Text width = '100% ' paddingLeft = "4" paddingRight = paddingTop "4" = "4" >
    < mx:text > OUTPUT: {outputString} < / mx:text >
    < / mx:Text >
    < / mx:Canvas >

    < / mx:Application >

    Thank you very much! I do not have the notion that the HTTPService is indded just an HTTP call. So yes that it a much simpler way to call just ColdFusion to return the XML string to the application. No reason to use Flash Remoting or CFCS etc... and certainly not a web server. This made the turn that I called a HTTPService now what charges by coldfusion page that returns XML and bam, works well with e4x result etc... Thanks tracy!

  • SQL - &amp; gt; PHP - &amp; gt; XML - &amp; gt; Flex 2

    Hello world!

    I've only played with Flex for about 6 weeks or so and I've learned a lot, a lot of tutorials and help system online. However, the project that I'm trying to set up requires that I can pass data back to the Db. I have not yet tried to write in a database yet because for the last 3 weeks I tried all combinations (except his work) to write my Db in XML data and use an HTTPService tag to get it back, to be used as dataProviders. I tried everything that affects remote on this site. Several others I found online and modified the resultFormat and my types of variables in all combinations (resultFormat = "["', object, xml, e4x, text, table "]" & merge: [collection ArrayCollection, array, XML, XMLList, XMLListCollection]) and received as much mistakes and periods nonworking results for my efforts. I don't know if there may be a setting PHP/MySQL on my server that has not established how it should be? or if I simply failed to notice a few simple details.

    Here is the PHP version I think currently more promising:
    Quote:
    <? php require_once('Connections/peaceheartconnection.php'); Header ("Content-type: text/xml");


    @mysql_select_db ($database_peaceheartconnection, $peaceheartconnection);
    $query_topics = "SELECT * FROM p_insight_topics";
    $topics = mysql_query ($query_topics, $peaceheartconnection) or die (mysql_error ());
    $row_topics = mysql_fetch_assoc ($topics);
    $totalRows_topics = mysql_num_rows ($topics);

    @mysql_select_db ($database_peaceheartconnection, $peaceheartconnection);
    $query_categories = "SELECT * FROM p_insight_types";
    $categories = mysql_query ($query_categories, $peaceheartconnection) or die (mysql_error ());
    $row_categories = mysql_fetch_assoc ($categories);
    $totalRows_categories = mysql_num_rows ($categories);

    Print ("<?") XML version=\"1.0\"encoding = \"utf-8\"? > ");"
    $dataXML = ";

    $dataXML. = "< data > < categories > ';

    While ($CAT = mysql_fetch_object ($categories))
    {
    $dataXML. = "< category > $cat-> type < / category > ';
    }
    $dataXML. = "< / categories > ';

    $dataXML. = "< categories > ';

    While ($topic = mysql_fetch_object ($topics))
    {
    $dataXML. = "" < section > $topic-> heading < / subject > ";"
    }
    $dataXML. = "< / topics > < / data > ';
    ? >

    <? PHP
    echo $dataXML;

    ? >

    <? PHP



    mysql_free_result ($topics);

    mysql_free_result ($categories);
    ? >
  • Using XML with Flex - better Question practice

    Hello

    I use an XML file as a dataProvider for my Flex application.
    My request is quite large and we do move a lot of data - so the XML file I use is also big enough.

    I have read a few tutorials and had air in-depth examples online and I'm just after a little advice. My application works, but I don't know if I went about setting up and using my data provider of the best (most effective) way.

    I'm basically after a few tips as to time, I go on (access) using my XML and by filling my Flex application is the best and most effective way?

    My request is made up of the main application (MXML) and also additional file in the form of files / components.

    I'll set up my connection to my XML in my application file master file using HTTPService:

    < mx:HTTPService
    ID = 'myResults '.
    ' URL =' http://localhost/myFlexDataProvider.xml '
    resultFormat = "e4x".
    result = "myResultHandler (Event)" / > "

    and the manipulation of my results with the following function:

    public void myResultHandler(event:ResultEvent):void
    {
    myDataFeed = event.result as XML;
    }

    in my application, I'll put my values of variables by first delacring them:

    public var fName:String;
    public var lName:String;
    public var zipcode: string;
    public var telNum:int;

    And then, giving them a value to "break" into the XML, E; g:

    fName = myDataFeed.employeeDetails.contactDetails.firstName;
    lName = myDataFeed.employeeDetails.contactDetails.lastName;
    Postal code = myDataFeed.employeeDetails.contactDetails.address.postcode;
    telNum = myDataFeed.employeeDetails.contactDetails.postcode;

    etc...

    So, for any of my external components (components in another FILE), I'm so referencing the values it with Application:

    Import mx.core.Application;

    And by setting the values / variables in components AS as follows:

    public var fName:String;
    public var lName:String;


    fName = Application.application.myDataFeed.employeeDetails.contactDetails.firstName;
    lName = Application.application.myDataFeed.employeeDetails.contactDetails.lastName;


    As mentioned this method seems to work, however, is the best way to do it? :
    -Connect to my XML file
    -Set up my application variables
    -Give my values of variables of the XML file...

    Keeping in mind that there are many variable must be defined and there for a lot of lines of code just setting and allocation of variable values of my XML file in this particular application.

    Could someone advise me please on this one there?

    Thank you very much
    Jon.

    I see no problem with it.

    Your alternatives are to ignore instance variables and to query the XML directly. If you use values in many places, the Variables will be easier to use and maintain.

    Also, instead of instance variables, colld place you in the values in an "associative array" (object/hashtable), or in a dictionary.

    Tracy

  • XML in Datagrid data binding

    Hello

    I'm new to Flex and strives to work on this sample project.

    http://learn.Adobe.com/wiki/display/Flex/2B.+code+files

    In the exchange of XML data, I am not able to read event.result.option. In debug mode, I am able to see the event.reult XML output but when I type, event.result.option debugger says she's not able to find any variable as Option... can anyone suggest me?

    XML data:

    "< html xmlns =" http://www.w3.org/1999/xhtml "> "
    < head id = "Heading1" >
    < title >
    Untitled page
    < /title >
    < / head >
    < body >
    < name of the form = "form1" method = "post" action = "XMLHttpService.aspx? pounds = 21 & amp;" zip code 32321 =' id = "form1" >
    < div >
    < input type = "hidden" name = "__VIEWSTATE" id = "__VIEWSTATE" value = "/ wEPDwULLTEzNDEyMDg2NjZkZObyVtHWMlazJbLjBDQh/voeDmmP" / >
    < / div >
    < div >
    < options >
    < option >
    < service >
    2 days:
    < / service >
    < price >
    216
    < / price >
    < / option >
    < option >
    < service >
    4 days:
    < / service >
    < price >
    432
    < / price >
    < / option >
    < option >
    < service >
    Field of EVE:
    < / service >
    < price >
    108
    < / price >
    < / option >
    < / options >
    < / div >
    < / make >
    < / body >
    < / html >

    How to access the event.result option?

    I tried your app with a few changes, but placing the data in the XML with options like root element and it worked. Here is my code.

  • Can I leave XML on the data of the group model cascades BB10 apps?

    I did the analysis of XML in the XML data model & it's work very well. But impossible to sort data that's why I try to group data model...

    Please help me...

    Thanks in advance.

    Hi all

    Thank you guys for your valuable response.

    I did the code below.

    void::callXMLList() {} A
    actIndicator = myNavPane->findChild ("xmlIndicator");
    listView = myNavPane->findChild ("xmlListView");
    GroupDataModel * model = new GroupDataModel();

    Load the XML data in the local file
    XDA XmlDataAccess;
    QVariant list = xda.load)
    QDir::currentPath() + "/ app/native/assets/contacts.xml."
    (' / contacts/contact ");

    Add data to the model
    model-> insertList (()) list.value;
    QStringList key;
    me?<>
    model-> setSortingKeys (key);
    Create a ListView and add the template to the list
    ListView * listView = new ListView;
    listView-> setDataModel (model);
    QTextStream out (stdout);
    off< "\n="" connect="">
    actIndicator-> stop();
    }

    Thank you once again...

Maybe you are looking for

  • Twist cannot pull up bar charms with touchscreen

    Thus, for some reason any charms bar is no longer comes with the touch screen. It will come out with the mouse and the touch screen seems to work fine otherwise. I calibrated the screen, and I always feel the question. Anyone have any suggestions, or

  • ILA classic blackBerry

    I recently got the classic BB and I can't seem to get the identification of the appellant to work. When someone calls, I see only the number unless they're in my contacts. It is common or is there a 3rd party application that works on the classic. Si

  • GlobalEvent and NotificationsManager

    I use both methods (such as store runtime) for inter-app communication and all work just as well in their context. That said, the line between using deferred (in particular) events and GlobalEvent looks a little blurry for me... * make a real differe

  • Operating system reinstallation problem

    Hardware: Dell XPS410, bought 1007 O / s: Vista Home Premium, 32-bit My hard drive crashed so I had to reinstall the OS from the Dell reinstallation DVD, P/N NX589 Once reinstalled one apparently successful, Vista will NOT accept the Service Pack 1 u

  • Hey I have a pc and Internet, but when I try to conect with my lightroom iphone say that my pc has no internet what should I do?

    Hey I have a pc and Internet, but when I try to conect with my lightroom iphone say that my pc has no internet what should I do?