How to bind XML to Datagrid?

My xml is here:

<? XML version = "1.0"? > < ITRequests > < CallInfo > < type id = "UNSIGNED INT" > 42 < /ID > < request_no type = "VARCHAR" > 1313_IT_220520100709 < / request_no > < requester_uid type = "VARCHAR" > administrator < / requester_uid > < request_date type = "VARCHAR" > 22 May 2010 19:09:34 < / request_date > < title type = "VARCHAR" > Installation printer < / title > < status type "VARCHAR" = > Closed < / status > < / CallInfo > < CallInfo > < type id = "UNSIGNED INT" > < /ID > 43 < request_no type = "VARCHAR" > 1314_IT_220520100718 < / request_no > < requester_uid type = "VARCHAR" > administrator < / requester_uid > < request_date type = "VARCHAR" > 22 May 2010 19:17:49 < / request_date > < title type = "VARCHAR" > Software Installation < / title > < status type "VARCHAR" = > current < / status > < / CallInfo > < CallInfo > < / ITRequests >

I don't know how to link this to a simple data grid.

Can someone help me please?

PS: The data is in a string variable.

Thank you

Nith

Try this:


     421313_IT_220520100709administrator22-May-2010 07:09:34 PMPrinter InstallationClosed431314_IT_220520100718administrator22-May-2010 07:17:49 PMSoftware InstallationIn Progress";

          // Cast String to XML Document.
          var xml_file:XMLDocument = new XMLDocument(xml_string);

          // Decode XML to objects.
          var decoder:SimpleXMLDecoder = new SimpleXMLDecoder();
          var data:Object = decoder.decodeXML(xml_file);

          // Put objects source in ArrayCollection.
          array = new ArrayCollection(ArrayUtil.toArray(data.ITRequests.CallInfo));
     }
     ]]>


     
          
          
     

If it s to solve, please check useful response.

TKS

Emerson_RM

Tags: Flex

Similar Questions

  • Binding xml in datagrid

    Hi all.

    I'm new to Flex.

    I'm trying to bind variable testxml to datagrid.

    testXML

    - < dataObj >
    <var n="_cmd" t="s">RowList</var>
    - < obj o =" lignes " t =" a " >
    < var n = » 338 " t = » s"""> Test1, 322,3,20,2,100,200, challenge, 40000, 9, Public, 0, normal, 0,< /var>
    < var n = » 339 " t = » s"""> Test2, 323,0,20,0,100,200, challenge, 40000, 9, Public, 0, normal, 0,< /var>
    < var n = » 332 " t = » s"""> Test3, 345,0,20,0,100,200, challenge, 40000, 9, Public, 0, normal, 0,< /var>
    </obj>
    </dataObj>

    has tried

    < mx:DataGrid width = "786" id = "odalar" dataProvider = "{testXML.obj}" >
    < mx:columns >
    < mx:DataGridColumn headerText = "Column 1" dataField = "var" / >

    < / mx:columns >

    < / mx:DataGrid >

    That puts all the xml data in a datagrid row.


    I have
    Could you please help?


    Hi Woka_Junior,

    Check out the code below:


    http://www.Adobe.com/2006/mxml"layout ="absolute"creationComplete ="init (); » >

      Import mx.collections.ArrayCollection;

    Import mx.rpc.xml.SimpleXMLDecoder;
      
    [Bindable] private var dataProvider:ArrayCollection = new ArrayCollection();
      
    private function init (): void
    {
    var XML = testXML;
    var xmlDoc:XMLDocument = new XMLDocument (xml);
    var decoder: SimpleXMLDecoder = new SimpleXMLDecoder (true);
    var xmlObj:Object = decoder.decodeXML (xmlDoc);
    var resultObj:Object = xmlObj.dataObj;
    If (resultObj.obj.var1 is collection ArrayCollection)
    {
    dataProvider = resultObj.obj.var1 as ArrayCollection collection;
    }
    else if (resultObj.obj.var1 is object)
    {
    dataProvider.addItem (resultObj.obj.var1);
    }
       
    }
         
    ]]>


     
      RowList
     
      Test1, 322, 3, 20, 2, 100, 200, challenge, 40000, 9, Public, 0, normal, 0,.
      Test2, 323, 0, 20, 0, 100, 200, challenge, 40000, 9, Public, 0, normal, 0,.
      Test3, 345, 0, 20, 0, 100, 200, challenge, 40000, 9, Public, 0, normal, 0,.
     

     


           
               
               
               
           

    Note: I changed var var1 in your xml file just to distinguish it from the keyword var pre-defined in flex (used to declare a variable in Flex).

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

    Thank you

    Jean Claude Chari

  • How? extern XML in Datagrid updates dynamic textfield

    Hi, I hope someone can help me with that.

    I have a datagrid that is populated with xml extern.

    The number of items change from time to time.

    I have a date and a title in the DataGrid, but clicking on I want the text of the element (which is also available in the XML file) appear in the TextField.

    I saw examples of data from the datagrid to appear again in the textfield, but that is not what I want.

    Any help is greatly appreciated.

    Here is the code (datagrid working on the update of the TextField is not):

    --------------------

    Stop();

    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.addEventListener (Event.CHANGE, agendaItemKlik);

    function agendaItemKlik(event:Event):void

    {

    tekstVlak.text = event.target.selectedItem.agendaXML.verhaal [i] .tekst;

    }

    }

    agenda.dataProvider = componentProvider;

    }

    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();="">

    {

    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;

    }

  • How to bind xml or other data to a mobile list in Dreamweaver?

    I'm trying to understand what should be a simple thing in Dreamweaver.

    It is in the use of jquery mobile, how do I join a xml file for items in list of attributes?

    If this is not possible, someone would be able to tell me or direct me to a way to manage data in Dreamweaver for mobile applications. I'm on top, trying to understand all the technology. It seems that HTML5, xml, sqlite, json and all the possibilities. I have a simple database of items maybe 300: a picture and a description. The data will reside and be read on the mobile application client-side.

    I want to read items in a list. Then call to the top of the individual items on a new 'page' based on the selection of the user of the list item. It's so easy to Dashcode Mac. Surely, I must be missing something in Dreamweaver 5.5.

    TIA to anyone who is trying to point me in the right direction.

    Have a look here http://books.google.com.au/books?id=kJ5ZWFZtWFgC&pg=PA113&lpg=PA113&dq=spry+datasets+and+j query + mobile & source = bl & to ots = l8vMEvoRZn & to sig = rZYgQGSdsxX64jCQPnFFqJdMwFg & hl = en & to her = X & ei = xpwPT8 GRIumiiAeztrQK & to sqi = 2 & ved = 0CF4Q6AEwBw #v = onepage & to q = % 20datasets % 20and % 20jquery % 20mobile spry & f = false (apologies for the length of the URL) and here http://foundationphp.com/dwmobile/

    GRAMPS

  • Complex binding xml to a datagrid

    I can't make a small flex application. This is a tutorial on a blog was created several years ago. The location of the blog article is:
    http://www.bpurcell.org/blog/index.cfm?mode=entry & entry = 1020
    The article states: datagrid in Flex works very well with flat XML. But what happens if you have a XML package more complex that you need to bind to a DataGrid control?

    Code that I changed to work things out:
    I have changed the xmlns of macromedia adobe and only got the job.
    I also added < root > and < / root > in the template tag to make it work.
    I changed the columnName in the DatagridColumn tag to dataField
    These changes allows the application to compile and run, but I get an error as follows:

    ArgumentError: Error #1063: inconsistency of Argument on BindingComplexXMLToDatagrid County /: myLabelFunc (). Recitals 1, 2. at mx.controls.dataGridClasses::DataGridColumn/itemToLabel()

    If I remove the last beacon of datagridcolumn, the application runs ok but obviously that I have to make it work.

    Here is my complete app code:
    I think it should be simple enough, but I wasn't able to make it work.
    Any thoughts on how this can be made to work.

    <? XML version = "1.0" encoding = "utf-8"? >
    "" < mx:Application xmlns:mx = ' http://www.adobe.com/2006/mxml " width ="600"height ="450">
    < mx:Script >
    <! [CDATA]
    function myLabelFunc (point): String
    {
    If (item.address.number is undefined)
    {return null ;}
    on the other
    {return item.address.number + "" + item.address.street ;}}
    }
    []] >
    < / mx:Script >
    < mx: Model id = "thePersonModel" >
    < root >
    < name > Brandon < / name >
    < 30 > < / age >
    < address >
    foobar < Street > < / street >
    < number > 19 < / number >
    < / address >
    < / root >
    < / mx: Model >

    < mx:DataGrid id = "myDataGrid2".
    dataProvider = "{mx.utils.ArrayUtil.toArray (thePersonModel)}" >
    < mx:columns >
    < mx:Array >
    < mx:DataGridColumn dataField = "name" headerText = "Name" / >
    < mx:DataGridColumn dataField = "age" headerText = "Âge" / >
    < mx:DataGridColumn headerText = "Address" labelFunction = "myLabelFunc" / >
    < / mx:Array >
    < / mx:columns >
    < / mx:DataGrid >
    < / mx:Application >


    John,

    The DataGrid labelFunction takes two parameters:

    labelFunction(item:Object,_column:DataGridColumn):String

    So change your code to something like this:

    private void myLabelFunc(item:Object,_col:DataGridColumn):String

    The setting of the pass is not really necessary in your service, but you need to list your function parameters. Also, note that you must specify the type of the item as an object variable and the value of the scope of the public or private office.

    Another change would be to simplify the dataProvider binding to:

    Convert the XML template in a table does not seem necessary here, but it will work anyway.

    Vygo

  • How to bind a subvi (worksheet) with another VI

    Hello

    I want to know how to bind the data in the spreadsheet with the block diagram of the VI one another? IE I want to use 3 data collected in the worksheet block diagram has changed into a Subvi and this Subvi should be linked to another diagram of block that accepts these 3 entries to give a warning.

    Please help me how to link these two...:...

    Sorry, but I'm confused by most of your statements. There is a worksheet in Excel and a LabVIEW block diagram, but there is no such thing as a 'worksheet block diagram.

  • How to send XML using UTL_HTTP

    I try to drive, how to send XML data to a webserver using UTL_HTTP, but I get no answer

    I need to present the following document to server 'http://api.fastsms.co.uk/api/xmlapi.php' XML instructions are "the XML Document must be posted not coded, with a game like"xml"of UTF-8 character set parameter"

    If I submit the following in their test form XML

    <? XML version = "1.0"? >

    < apirequest version = "1" >

    < user >

    < username > * USER * < / username >

    password <>* password * < / password >

    < / user >

    < application >

    < name > Application example < / name >

    < version > 1.0 < / version >

    < / application >

    < inboundcheck lastid = "10711399" / >

    < / apirequest >

    I get a response XML returns with the messages in my Inbox.

    This is the code I'm trying to use to accomplish the same thing about PL/SQL: I know an answer just as soon as there is simply no content - header information.  What I am doing wrong?

    l_xml VARCHAR2 (5000);

    Utl_http.req req;

    resp utl_http.resp;

    HostHeaderName VARCHAR2 (256); -Name of the response header

    header_value VARCHAR2 (1024); -Value of the response header

    response_text VARCHAR2 (4000); -Response body

    l_url VARCHAR2 (100);

    BEGIN

    l_xml: = ' xml = <? XML version = "1.0"? > ';

    l_xml: = '< apirequest version = "1" >';

    l_xml: = '< user >. "

    l_xml: = ' < username > * USER * < / username > ';

    l_xml: = ' < password > * PASSWORD * < / password > ';

    l_xml: = ' < / user > ';

    l_xml: = '< application >. "

    l_xml: = ' < name > Application example < / name > '.

    l_xml: = ' < version > 1.0 < / version > ';

    l_xml: = < application "/ > ';

    l_xml: = ' < inboundcheck lastid = "10711399" / > ";

    l_xml: = ' < / apirequest > ';

    -Connection HTTP open

      l_url := ' http://api.fastsms.co.uk/api/xmlapi.php';

    Req: = utl_http.begin_request (l_url, 'POST', utl_http. HTTP_VERSION_1_1);

    -Set headers for type and length

    Utl_http.set_header ("req, 'Content-Type', ' application/x-www-formulaires-urlencoded");

    Utl_http.set_header (Req, 'Content-Length', to_char (length (l_xml)));

    -Write the setting

    Utl_http.write_text (Req, l_xml);

    -Reading response file

    resp: = utl_http.get_response (req);

    -Print the response headers

    BECAUSE me in 1... Utl_http.get_header_count (resp) LOOP

    Utl_http.get_header (resp, i, header_name, header_value);

    logging_pkg.info(header_name ||) ': ' || header_value);

    END LOOP;

    -Print the response body

    BEGIN

    LOOP

    Utl_http.READ_TEXT (resp., response_text);

    logging_pkg.info (response_text);

    END LOOP;

    EXCEPTION

    WHEN utl_http.end_of_body THEN

    logging_pkg.info ('end of body');

    END;

    -close the http connection

    Utl_http.end_response (resp);

    EXCEPTION

    WHEN utl_http.end_of_body THEN

    Utl_http.end_response (resp);

    END;

    See you soon,.

    Brent

    The fact that you do not receive a response of HTTP (headers) return, means that a basic communication worked. After reading the response:

    answer: = utl_http.get_response (request);

    Check the HTTP status code:

    If response.status_code...

    You should get a HTTP 200 for a successful call. May be that you run in a 50 x results, which implies a server error has occurred processing your HTTP call.

    Best bet to see the error on the server is the access log and/or Apache error.

    Oh yes - XML submits work very well through UTL_HTTP. Take a look at the sample code in https://forums.oracle.com/message/10450611#10450611

    In what concerns the validation code and using the syntax highlighting - edit, click use the Advanced Editor, highlight the code and click on the > on the toolbar to access the text highlighting the menu. Unfortunately this does not use fixed fonts - again. I hope that this will be corrected as forum features are addressed.

  • How to bind selectBooleanCheckbox in DB table

    I have selectBooleanCheckbox in table ADF that comes with the base data type of the column NUMBERtable.

    The JSF Page Code:
    <af:selectBooleanCheckbox value="#{row.bindings.PercentFlag.inputValue}"
                             label="#{row.bindings.PercentFlag.label}"
                             id="it7">                                        
    </af:selectBooleanCheckbox>
    Pagedef file code:
     <button IterBinding="MeasureConditionalFormatVOIterator" id="PercentFlag"
                DTSupportsMRU="false" StaticList="true">
          <AttrNames>
            <Item Value="PercentFlag"/>
          </AttrNames>
          <ValueList>
            <Item Value="1"/>
            <Item Value="0"/>
          </ValueList>
        </button>
    When I try to save this value in the database it throws the error:
    Error: PercentFlag: 'false' must be a signed decimal number.

    Could someone let me know how to bind the value 1/0 with db table.

    Thank you...

    Published by: broke on 9 February 2012 06:10

    The entity attribute 'PercentFlag', just change the type BigDecimal (or whatever it is at the moment) to Boolean. JDeveloper will automatically change the column type of database in BITS, which allows that the values 0 (false) and 1 (true).
    From there, once you drag the PercentFlag (or the entire table) in the data source to a page, JDeveloper will automatically add the column as a SelectBooleanCheckBox.
    I also recommend to set the default value for the attribute of the entity to 0 or 1. If the value is null and that the record is loaded on a page and validated, the record is marked as dirty since the SelectBooleanCheckBox knows only 2 values, true (1) or false (0).

  • How to integrate XML Pulisher OFA

    Hello

    How to integrate XML Pulisher with OFA?

    Kind regards
    Milot,

    Hello

    If you use link display can

    public XMLNode getPrintDataXML (//XMLNode)
    {
    OAViewObject vo = (OAViewObject) findViewObject ("EmpVO1");
    ByteArrayOutputStream OutputStream = new ByteArrayOutputStream();
    XMLNode xmlNode = vo.writeXML (XMLNode) (4, XMLInterface.XML_OPT_ALL_ROWS);
    Returns the xmlNode;
    }

    I hope this will get the see also link data.

    Kind regards
    Out Sharma

  • How to bind itemrender checkbox in a datagrid with the selecteditem property?

    Hey,.

    I have a datagrid with a checkbox column. I need the boxes to select different items I want to remove for example or do anything else with them. I thought to bind the checkboxes with the DataGrid.SelectedItems property but I Don t know how? Is there perhaps a better way to collect the elements of a datagrid control that are selected by a checkbox ItemRenderer?

    Thank you!

    What about Kat

    In this situation you must always be go the dataprovider of the DataGrid to see which check boxes are selected.

    So if the dataprovider for the DG does not have a field for the State of the checkbox, it is best to add a.

    Then simply change the field in the dataprovider for the line checjbox which is checked/uncheced and if you need to do something else on which boxes are checked, refer to the fields in the dataprovider.

    It is always best practice.

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

  • How to bind the form to an XML element with a specific attrib/value?

    Is it possible to link a form in Designer to an XML element using an attribute as a criterion value?  This is a very basic construction of XPath and I can't believe that the form designer cannot do this.  For example:

    < library >

    < book lang = "fr" >
    Harry Potter < title > < /title >
    < price > 29.99 < / price >
    < / book >

    < book lang = "MS" >
    < title > Learning XML < /title >
    < price > 39.95 < / price >
    < / book >

    < / book >

    I would bind only the knot book with an attribute lang of "eng".

    [The simple xpath reference would be: bookstore/book[@lang='eng']

    Thanks for any help that anyone can provide.  I am new to LiveCycle Designer

    Jordon

    You must use the below expression in data binding, property to get the title of the book whose language is English

    .book $. (lang.value == "eng") .title

    Thank you

    Srini

  • 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.

  • How to convert XML in table

    I have a simple xml file I want to convert to a table of front to bind the value of dataProvider?

    How to do this?

    Thanks for your help

    The reason is that I need to place a filter on this datagrid.

    I found a way with a httpService calling a php scripts and: var source: collection ArrayCollection = sessionConn.lastResult.rows.row as ArrayCollection collection;

    SEB

  • Load the XML in Datagrid

    I got the code to load my XML in a Datagrid Flash component, but I've played with him and lost the code of original work! Have a way to load:

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

    < account >

    < account >

    < user name = "Jim" pass = "856yhlews3525r1561 * ow3525856y" >

    Jim < user > < / user >

    856yhlews3525r1561 < pass > * ow3525856y < / Pass >

    < > < /XP > 47932 Xp

    < degree > 45 < / standings >

    < / name >

    < / account >

    < account >

    < name user = "Test" pass = "1886ef889 889toft4985s") >

    < User > test < / user >

    < pass > 889toft4985s) 1886ef889 < / Pass >

    < > < /XP > 34789 Xp

    < degree > 33 < / standings >

    < / name >

    < / account >

    < / accounts >

    It is just a rough, the local, the XML file, but has the same tags as my main. I want to have columns of user Xp and rank. I found a whole bunch of tutorials that are responsible for an attribute of a node, but nothing about a flat knot. In addition, it would be great if you could also explain how to select a line and going to a certain range.

    Thanks, Alex

    Import fl.controls.DataGrid;

    Import fl.controls.ScrollPolicy;

    Import fl.data.DataProvider;

    import flash.net.URLLoader;

    import flash.events.Event;

    var dp:DataProvider = new DataProvider();

    var dg:DataGrid = new DataGrid();

    CGI Columns = ["user", "XP", "Rank"];

    addChild (dg);

    var urlloader:URLLoader = new URLLoader();

    urlloader.addEventListener (Event.COMPLETE, loadcompleteF);

    URLLoader.Load (new URLRequest ("whatever.xml"));

    function loadcompleteF(e:Event):void {}

    var xml:XML = XML (e.target.data);

    for (var i: int = 0; i< xml..name.length();="" i++)="">

    dp.addItem ({user: xml...}) Name [i]. User.Text (), Xp:xml... Name [i]. XP. Text(), grade: xml... Name [i]. Rank.Text ()});

    }

    dg.dataProvider = dp;

    }

  • XML and DataGrid

    I am struggling with XML in a DataGrid. You can someone tell me how to fill the dataField for firstName, lastName, and username, given the XML code below? Thanks for your help.

    <? XML version = "1.0"? >
    " < = xmlns:mx mx:Application ' http://www.Adobe.com/2006/MXML ">

    < mx:XMLList id = "userData" >
    < user >
    < user username = "fxxxxx" firstName = 'Auntie' LastName As String 'Hope' = >
    < publication pubId = '9' pubTitle = 'Daily News' >
    < political policyId = '9' policyDescription = "Questions to deliver" policyname = "DeliverIssues" / >
    < / publication >
    < / user >
    < user userId = "fyyyyy" = "Lele" firstName LastName As String = "Herr" >
    < publication pubId = '9' pubTitle = 'Daily News' >
    < policy policyId = '1' policyDescription = policyname 'Manage groups' = "ManageGroups" / >
    < / publication >
    < / user >
    < / users >
    < / mx:XMLList >

    < mx:Panel title = "DataGrid Control Example" height = "100%" width = "100%".
    paddingTop = "10" paddingLeft = "10" paddingRight = "10" >

    < mx:DataGrid id = "dg" width = "100%" height = "100%" number of rows = "5" dataProvider = "{userData}" >
    < mx:columns >
    < mx:DataGridColumn dataField = "firstName" headerText = "FirstName" / >
    < mx:DataGridColumn dataField = "lastName" headerText = "lastName" / >
    < mx:DataGridColumn dataField = "userId" headerText = "Email" / >
    < / mx:columns >
    < / mx:DataGrid >

    < mx:Form width = '100 percent"height ="100% ">
    < mx:FormItem label = "name" >
    < mx:Label text="{dg.selectedItem.firstName}"/ >
    < / mx:FormItem >
    < mx:FormItem label = "name" >
    < mx:Label text="{dg.selectedItem.lastName}"/ >
    < / mx:FormItem >
    < mx:FormItem label = "userId" >
    < mx:Label text="{dg.selectedItem.userId}"/ >
    < / mx:FormItem >
    < / mx:Form >
    < / mx:Panel >
    < / mx:Application >

    Just in case where you have not yet:


    http://www.Adobe.com/2006/mxml">
     
       
         
           
         

       

       
         
           
         

       

     

     
    paddingTop = "10" paddingLeft = "10" paddingRight = "10" >
       
         
           
           
           
         

       

       
         
            {dg.selectedItem.@firstName}"/ >}
         

         
            {dg.selectedItem.@lastName}"/ >}
         

         

            {dg.selectedItem.@userId}"/ >}
         
           
             
     

Maybe you are looking for