Applying functions to XML output in Data Grid

Hi All,
I am currently feeding a datagrid with XML generated from
php. I am constructing the grid using a table similar to the
Products Demo.
I could do with formatting some of this output, ideally with
a PHP funtion or a javascript function.
An example row from my grid is below:
<tr spry:when="{ds_RowID} == {ds_CurrentRowID}"
class="{ds_EvenOddRow}" spry:setrow="theOrders"
spry:hover="rowHover" spry:select="rowSelected" id="{ord_id}"
onClick="showOrder('{ord_id}');">
<td width="500px">{ord_desc}</td>
<td width="200px">{ord_delDate}</td>
<td width="80px">{ord_simQty}</td>
<td width="60px">{ord_packId}</td>
</tr>
I would like to apply a funtion to the {ord_desc} column of
each row.
Any ideas?
Thanks in advance.
T12

Hi T12,
Checkout this sample:
http://labs.adobe.com/technologies/spry/samples/data_region/CustomColumnsSample.html
or
http://labs.adobe.com/technologies/spry/samples/data_region/HTMLFragsInXMLSample.html
They both show you how to use an observer to pre-process the
data.
--== Kin ==--

Similar Messages

  • Oracle Reports with XML output showing data as asterik character

    Hello,
    I'm trying to create an Oracle report with xml output. Here is the issue I'm having some of the columns in my report are of datatype number. When I run the report and generate xml file the values for those columns(datatype number) are showing as (*) character, other columns are showing fine. But when I run the report as text output then data is fine. I don't understand why this is happening.
    The property of column is Column Type - Database Scalar, Datatype - Number , width 0,-127.
    Does the width has to do anything with this?
    I'm using Report Builder 6.0.8.11.3, DB version 10g.
    Can anyone please help me with the issue I'm having.
    Thanks

    If the links in your example report1 and report2
    follow my format stated earlier
    http://machine:port/reports/rwservlet/report=reportnam
    e.rdf&destype=cache& paramform=htmlcss&server=<YourReportSe
    rverName>&userid=scott/tiger@hrdb&desformat=pdf
    This is what I believe
    >
    so http://machine:port/ is the port where
    JBoss is running and
    This should be the port that the report server is listening on
    >
    server=<YourReportServerName> is the name of
    my oracle report server
    so I call the above link in my current application
    and the report would show up
    Yes
    >
    that means (correct me if I am wrong) that my reports
    would have to be deployed in OracleAS
    Yes
    >
    I have to try all this yet as till this point I was
    trying to run Oracle reports deployed in JBoss...
    This may be possible, I am not sure.
    >
    Oracle J2EE Thin Client?
    I am not sure what this is used for in your setup.

  • Ah! the delights of advanced data grid!

    I have a xml hierarchical advanced data grid.
    Is there a way to disable the folderIcons for the advanceddatagrid?
    Or is there a way to integrate the folderIcon actions to selected row actions?
    Right now, I have a listener for itemOpen. When one folder opens, then another one will close. However, when the user clicks on the folderIcon....it does not do this. I do not know how to access the expandeditem of the advanceddatagrid.
    Thank you for your help!
    Emma
    * Also, the fonts are being embedded by css...when you click on the folder...the fonts jump while they are being propagated. suggestions?

    That is a great idea...except I am using the selectRow to use these same events.
    It seems what I need is access to the same selectedItem.
    When I click on the row, I pass through _selectedItem from the event function.
    However, it is a little bit more complicated for the drop down buttons.
    I try to get the same format with this:
    selectedItem=IHierarchicalCollectionView(adg.dataProvider).openNodes;
    but I get an [object][object]
    I found this bit of code on a site:
    import mx.collections.HierarchicalCollectionView;
    myOpenNodes:Array = new Array(); 
    var HierColView:HierarchicalCollectionView = HierarchicalCollectionView(myADG.dataProvider);
    for each ( var item:Object in HierColView.openNodes ) {
    myOpenNodes.push(item);
    myADG.dataProvider.openNodes = myOpenNodes;

  • How to save xml and xsl function to a data grid column

    hi. wondering, i have a xml and a xsl file, and have the transform class, and so need to save the xml and the xsl file, and display the results on a particular data grid column and to loop through the data grid columns. so, how do i use the xml save function
    class, any examples or point me to articles, where i can read how to do this. need to display a file, with a different colour and font. any ideas. thanks. marvin.hi. need to save a xml and xsl file and display the results on data grid. how do i do this. any
    sample code or articles i can read about thanks. marvin.
    http://startrekcafe.stevesdomain.net http://groups.yahoo.com/groups/JawsOz

    
    Hi.
    Okay, well, did ask on the msdn forums, and some one replied, and so, will paste the code he suggested.
    But getting a lot of errors.
    Can you help me out.
    Where am I going wrong.
    So, I can then get this to work, then it shows the colours and the fonts on the specified data grid.
    Can you help.
    Want to get this working and passed today if possible.
    Will pasate the code and the errors below.
    Can you help.
    Where am I going wrong.
    Marvin.
    // Set up the data set.
    DataSet ds =
    new
    DataSet();
    // Set up the data table.
    DataTable dt =
    new
    DataTable();
    // Ad the data table to the data set.
        ds.Tables.Add(dt);
    // Write the xml document to the data grid column.
        ds.WriteXML(@"c:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\CurrentCount.xml");
        ds.WriteXML(@"c:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\OnOrder.xml");
        ds.ReadXML(@"c:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\CurrentCount.xml");
        ds.ReadXML(@"c:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\OnOrder.xml");
    // Set up the data table and the data set and set to 0.
        dgvDisplayData.DataSource = ds.Tables[0];
    Error      1              Invalid token '(' in class, struct, or interface member declaration               
    C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs                215        
    18           WoodStocks
    Error      2              Invalid token ')' in class, struct, or interface member declaration               
    C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs                215        
    21           WoodStocks
    Error      3              Invalid token '(' in class, struct, or interface member declaration               
    C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs                219        
    16           WoodStocks
    Error      4              Invalid token '(' in class, struct, or interface member declaration               
    C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs                221        
    16           WoodStocks
    Error      5              Invalid token '(' in class, struct, or interface member declaration               
    C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs                222        
    15           WoodStocks
    Error      6              Invalid token '(' in class, struct, or interface member declaration               
    C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs                223        
    15           WoodStocks
    Error      7              Invalid token '=' in class, struct, or interface member declaration               
    C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs                227        
    31           WoodStocks
    Error      8              Array size cannot be specified in a variable declaration (try initializing with a 'new' expression)               
    C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs                227        
    43           WoodStocks
    Error      9              Invalid token ';' in class, struct, or interface member declaration               
    C:\Docs\Education\CertificateFourProgramming\CoreInfrastructure\DevelopingXMLApplications\Assignments\WoodStocks\WoodStocks\frmData.cs                227        
    45           WoodStocks
    Can you help me out.
    Thanks.
    http://startrekcafe.stevesdomain.net http://groups.yahoo.com/groups/JawsOz

  • How to apply XSLT to XML file while importing XML data using XSU plsql API

    I need to load XML file with nested repeating elements into Oracle tables and I am using XSU PLSQL API utility package dbms_xmlSave.insertXML. Can use XMLGen package also!!
    I found out through documentation that I need to have XML file with ROWSET/ROW tags around the elements. As I have no control of XML file coming from external source, so I wish to apply XSLT to XML. I found setXSLT/setStylesheet procedures but it's not working as expected.
    Can you help me with some sample code for the purpose.
    Thanks

    I'm new at XML and XSL as well, but maybe the following code I built can help:
    CREATE OR REPLACE PACKAGE Xml_Pkg AS
    /* this record and table type are used for the transformTags procedure */
    TYPE TagTransform_t IS RECORD (
    old_tag VARCHAR2(255),
    new_tag VARCHAR2(255) );
    TYPE TagTransformList_t IS TABLE OF TagTransform_t INDEX BY BINARY_INTEGER;
    /* use DBMS_OUTPUT to print out a CLOB */
    PROCEDURE printClobOut(p_clob IN OUT NOCOPY CLOB);
    /* using a list of old/new tags, transform all old into new in XML2 */
    PROCEDURE transformTags(
    p_List TagTransformList_t,
    p_XML1 IN OUT NOCOPY CLOB,
    p_XML2 IN OUT NOCOPY CLOB);
    END Xml_Pkg;
    CREATE OR REPLACE PACKAGE BODY Xml_Pkg AS
    /* print a CLOB using newlines */
    PROCEDURE printClobOut(p_clob IN OUT NOCOPY CLOB) IS
    buffer_overflow EXCEPTION;
    PRAGMA EXCEPTION_INIT(buffer_overflow,-20000);
    l_offset NUMBER;
    l_len NUMBER;
    l_o_buf VARCHAR2(255);
    l_amount NUMBER; --}
    l_f_amt NUMBER := 0; --}To hold the amount of data
    l_f_amt2 NUMBER; --}to be read or that has been
    l_amt2 NUMBER := -1; --}read
    l_offset2 NUMBER;
    l_amt3 NUMBER;
    l_chk NUMBER := 255;
    BEGIN
    l_len := DBMS_LOB.GETLENGTH(p_clob);
    l_offset := 1;
    WHILE l_len > 0 LOOP
    l_amount := DBMS_LOB.INSTR(p_clob,CHR(10),l_offset,1);
    --Amount returned is the count from the start of the file,
    --not from the offset.
    IF l_amount = 0 THEN
    --No more linefeeds so need to read remaining data.
    l_amount := l_len;
    l_amt2 := l_amount;
    ELSE
    l_f_amt2 := l_amount; --Store position of next LF
    l_amount := l_amount - l_f_amt; --Calc position from last LF
    l_f_amt := l_f_amt2; --Store position for next time
    l_amt2 := l_amount - 1; --Read up to but not the LF
    END IF;
    /* divide the read into 255 character chunks for dbms_output */
    IF l_amt2 != 0 THEN
    l_amt3 := l_amt2;
    l_offset2 := l_offset;
    WHILE l_amt3 > l_chk LOOP
    DBMS_LOB.READ(p_clob,l_chk,l_offset2,l_o_buf);
    DBMS_OUTPUT.PUT_LINE(l_o_buf);
    l_amt3 := l_amt3 - l_chk;
    l_offset2 := l_offset2 + l_chk;
    END LOOP;
    IF l_amt3 != 0 THEN
    DBMS_LOB.READ(p_clob,l_amt3,l_offset2,l_o_buf);
    DBMS_OUTPUT.PUT_LINE(l_o_buf);
    END IF;
    END IF;
    l_len := l_len - l_amount;
    l_offset := l_offset+l_amount;
    END LOOP;
    EXCEPTION
    WHEN buffer_overflow THEN
    RETURN;
    END printClobOut;
    /* shortcut "writeline" procedure for CLOB buffer writes */
    PROCEDURE wr(p_clob IN OUT NOCOPY CLOB, s VARCHAR2) IS
    BEGIN
    DBMS_LOB.WRITEAPPEND(p_clob,LENGTH(s)+1,s||CHR(10));
    END;
    /* the standard XSLT should include the identity template or the output XML will be malformed */
    PROCEDURE newXsltHeader(p_xsl IN OUT NOCOPY CLOB, p_identity_template BOOLEAN DEFAULT TRUE) IS
    BEGIN
    DBMS_LOB.TRIM(p_xsl,0);
    /* standard XSL header */
    wr(p_xsl,'<?xml version="1.0"?>');
    /* note that the namespace for the xsl is restricted to the w3 1999/XSL */
    wr(p_xsl,'<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">');
    IF p_identity_template THEN
    /* create identity template (transfers all "other" nodes) */
    wr(p_xsl,' <xsl:template match="node()">');
    wr(p_xsl,' <xsl:copy>');
    wr(p_xsl,' <xsl:apply-templates/>');
    wr(p_xsl,' </xsl:copy>');
    wr(p_xsl,' </xsl:template>');
    END IF;
    END newXsltHeader;
    PROCEDURE newXsltFooter(p_xsl IN OUT NOCOPY CLOB) IS
    BEGIN
    /* standard xsl footer */
    wr(p_xsl,'</xsl:stylesheet>');
    END newXsltFooter;
    /* using the stylesheet in p_xsl, transform p_XML1 into p_XML2 */
    PROCEDURE transformXML(p_xsl IN OUT NOCOPY CLOB, p_XML1 IN OUT NOCOPY CLOB, p_XML2 IN OUT NOCOPY CLOB) IS
    l_parser XMLPARSER.Parser;
    l_doc XMLDOM.DOMDocument;
    l_xsl_proc XSLPROCESSOR.Processor;
    l_xsl_ss XSLPROCESSOR.Stylesheet;
    BEGIN
    /* parse XSL CLOB */
    l_parser := XMLPARSER.newParser;
    BEGIN
    XMLPARSER.showWarnings(l_parser,TRUE);
    XMLPARSER.parseClob(l_parser,p_xsl);
    l_doc := XMLPARSER.getDocument(l_parser);
    XMLPARSER.freeParser(l_parser);
    EXCEPTION
    WHEN OTHERS THEN
    XMLPARSER.freeParser(l_parser);
    RAISE;
    END;
    /* get Stylesheet from DOMDOC */
    l_xsl_ss := XSLPROCESSOR.newStylesheet(l_doc,NULL);
    BEGIN
    /* parse XML1 CLOB */
    l_parser := XMLPARSER.newParser;
    BEGIN
    XMLPARSER.showWarnings(l_parser,TRUE);
    XMLPARSER.parseClob(l_parser,p_xml1);
    l_doc := XMLPARSER.getDocument(l_parser);
    XMLPARSER.freeParser(l_parser);
    EXCEPTION
    WHEN OTHERS THEN
    XMLPARSER.freeParser(l_parser);
    RAISE;
    END;
    /* process doc to XML2 */
    l_xsl_proc := XSLPROCESSOR.newProcessor;
    BEGIN
    XSLPROCESSOR.processXSL(l_xsl_proc, l_xsl_ss, l_doc, p_xml2);
    XSLPROCESSOR.freeProcessor(l_xsl_proc);
    EXCEPTION
    WHEN OTHERS THEN
    XSLPROCESSOR.freeProcessor(l_xsl_proc);
    RAISE;
    END;
    XSLPROCESSOR.freeStylesheet(l_xsl_ss);
    EXCEPTION
    WHEN OTHERS THEN
    XSLPROCESSOR.freeStylesheet(l_xsl_ss);
    RAISE;
    END;
    END transformXML;
    /* transform XML1 into XML2 using list p_List of old/new tags */
    PROCEDURE transformTags(p_List TagTransformList_t, p_XML1 IN OUT NOCOPY CLOB, p_XML2 IN OUT NOCOPY CLOB) IS
    l_xsl CLOB;
    BEGIN
    /* create XSL CLOB */
    DBMS_LOB.CREATETEMPORARY(l_xsl,TRUE);
    /* create standard header with identity template */
    newXsltHeader(l_xsl,TRUE);
    /* create one template for each node translation */
    FOR i IN 1..p_List.COUNT LOOP
    wr(l_xsl,' <xsl:template match="'||p_List(i).old_tag||'">');
    wr(l_xsl,' <'||p_List(i).new_tag||'><xsl:apply-templates/></'||p_List(i).new_tag||'>');
    wr(l_xsl,' </xsl:template>');
    END LOOP;
    /* create standard footer */
    newXsltFooter(l_xsl);
    -- dbms_output.put_line('l_xsl:');
    -- dbms_output.put_line('--------------------');
    -- printClobOut(l_xsl);
    -- dbms_output.put_line('--------------------');
    transformXML(l_xsl, p_XML1, p_XML2);
    DBMS_LOB.FREETEMPORARY(l_xsl);
    /* -- unit testing
    set serveroutput on size 100000
    Declare
    queryContext DBMS_XMLQUERY.ctxType;
    xList XML_PKG.TagTransformList_t;
    xmlCLOB CLOB;
    xmlCLOB2 CLOB;
    Begin
    DBMS_LOB.CREATETEMPORARY(xmlCLOB,true);
    DBMS_LOB.CREATETEMPORARY(xmlCLOB2,true);
    xList(1).old_tag := 'A';
    xList(1).new_tag := 'MyTag1';
    xList(2).old_tag := 'B';
    xList(2).new_tag := 'MyTag2';
    queryContext := DBMS_XMLQUERY.newContext('Select * from t');
    xmlCLOB := DBMS_XMLQUERY.getXML(queryContext);
    DBMS_XMLQuery.closeContext(queryContext);
    dbms_output.put_line('xmlCLOB:');
    dbms_output.put_line('--------------------');
    XML_PKG.printClobOut(xmlCLOB);
    dbms_output.put_line('--------------------');
    xml_pkg.transformTags(xList,xmlCLOB,xmlCLOB2);
    dbms_output.put_line('xml2CLOB:');
    dbms_output.put_line('--------------------');
    XML_PKG.printClobOut(xmlCLOB2);
    dbms_output.put_line('--------------------');
    DBMS_LOB.FREETEMPORARY(xmlCLOB);
    DBMS_LOB.FREETEMPORARY(xmlCLOB2);
    End;
    END transformTags;
    END Xml_Pkg;

  • XML output Function module

    Hi All,
    Is there any function module in ABAP to generate an xml structure?
    I want to generate an xml output in a string for the input structure (internal table)
    Thanks
    Ricky

    Hi ricky,
    1. itab --- > xml
    xml ---> itab.
    2. This program will do both.
    (just copy paste in new program)
    3.
    REPORT abc.
    DATA
    DATA : t001 LIKE TABLE OF t001 WITH HEADER LINE.
    DATA : BEGIN OF itab OCCURS 0,
    a(100) TYPE c,
    END OF itab.
    DATA: xml_out TYPE string .
    DATA : BEGIN OF upl OCCURS 0,
    f(255) TYPE c,
    END OF upl.
    DATA: xmlupl TYPE string .
    FIRST PHASE
    FIRST PHASE
    FIRST PHASE
    Fetch Data
    SELECT * FROM t001 INTO TABLE t001.
    XML
    CALL TRANSFORMATION ('ID')
    SOURCE tab = t001[]
    RESULT XML xml_out.
    CALL FUNCTION 'SCMS_STRING_TO_FTEXT'
      EXPORTING
        TEXT            = xml_out
    IMPORTING
      LENGTH          =
      TABLES
        FTEXT_TAB       = itab.
    Download
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    filetype = 'BIN'
    filename = 'd:\xx.xml'
    TABLES
    data_tab = itab.
    SECOND PHASE
    SECOND PHASE
    SECOND PHASE
    BREAK-POINT.
    REFRESH t001.
    CLEAR t001.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = 'D:\XX.XML'
    filetype = 'BIN'
    TABLES
    data_tab = upl.
    LOOP AT upl.
    CONCATENATE xmlupl upl-f INTO xmlupl.
    ENDLOOP.
    XML
    CALL TRANSFORMATION ('ID')
    SOURCE XML xmlupl
    RESULT tab = t001[]
    BREAK-POINT.
    regards,
    amit m.

  • HELP: XML or Data Grid failing from server

    Help,
    I am working a proof-of-concept flash function for a client
    that reads an XML file into a data grid. As coded, it works great
    when I run it locally, but when I transfer it to the web server it
    doesn't work (grid object shows but no data). And I guess I don't
    understand remote debugging because when I "Begin remote debugging
    session" and then "Open from site" it appears to download and
    again, runs fine.
    The the remote SWF is located at
    http://www.gw-webs.com/TSI/teamTSI.SWF.
    The XML and HTML are also located in the same remote folder.
    The code is all in Frame 1 of the file (not in a movie clip):
    _global.nameAR = new Array;
    _global.titleAR = new Array;
    _global.biographyAR = new Array;
    _global.contactAddressAR = new Array;
    _global.contactPhoneAR = new Array;
    _global.contactEmailAR = new Array;
    _global.pictureFileAR = new Array;
    _global.ARindex = 0;
    hd_name._visible = false;
    hd_title._visible = false;
    hd_biography._visible = false;
    hd_phone._visible = false;
    hd_email._visible = false;
    hd_mail._visible = false;
    function processXMLData(xml:XML)
    var i :Number = 0;
    var num:Number = xml.firstChild.childNodes.length;
    for (var i = 0; i < num; i++) {
    _global.nameAR
    =
    xml.firstChild.childNodes.childNodes[0].childNodes[0].nodeValue;
    _global.titleAR
    =
    xml.firstChild.childNodes.childNodes[1].childNodes[0].nodeValue;
    _global.biographyAR
    =
    xml.firstChild.childNodes.childNodes[2].childNodes[0].nodeValue;
    _global.contactAddressAR
    =
    xml.firstChild.childNodes.childNodes[3].childNodes[0].nodeValue;
    _global.contactPhoneAR
    =
    xml.firstChild.childNodes.childNodes[4].childNodes[0].nodeValue;
    _global.contactEmailAR
    =
    xml.firstChild.childNodes.childNodes[5].childNodes[0].nodeValue;
    _global.pictureFileAR
    =
    xml.firstChild.childNodes.childNodes[6].childNodes[0].nodeValue;
    var dataAR = new Array;
    for (i = 0; i < num; i++) {
    dataAR
    = ({Name: _global.nameAR, Title: _global.titleAR
    dg_team.dataProvider = dataAR;
    var xmlData=new XML();
    System.useCodepage = true;
    xmlData.ignoreWhite=true;
    xmlData.onLoad = function(ok:Boolean) {
    if (ok) {
    processXMLData(this);
    } else {
    trace("XML did not load");
    // Create data grid click listener object
    var dgListener:Object = new Object();
    dgListener.cellPress = function(evt_obj:Object) {
    i = evt_obj.itemIndex;
    if (_global.nameAR <> null) {
    hd_name._visible = true;
    tx_name.text = _global.nameAR
    else {
    hd_name._visible = false;
    tx_name.text = "";
    if (_global.titleAR <> null) {
    hd_title._visible = true;
    tx_title.text = _global.titleAR
    else {
    hd_title._visible = false;
    tx_title.text = "";
    if (_global.biographyAR <> null) {
    hd_biography._visible = true;
    tx_biography.text = _global.biographyAR
    else {
    hd_biography._visible = false;
    tx_biography.text = "";
    if (_global.contactPhoneAR <> null) {
    hd_phone._visible = true;
    tx_phone.text = _global.contactPhoneAR
    else {
    hd_phone._visible = false;
    tx_phone.text = "";
    if (_global.contactEmailAR <> null) {
    hd_email._visible = true;
    tx_email.text = _global.contactEmailAR
    else {
    hd_email._visible = false;
    tx_email.text = "";
    if (_global.contactAddressAR <> null) {
    hd_mail._visible = true;
    tx_mail.text = _global.contactAddressAR
    else {
    hd_mail._visible = false;
    tx_mail.text = "";
    xmlData.load("teamTSI_en.xml");
    // Add listener.
    dg_team.addEventListener("cellPress", dgListener);
    stop();

    1. your link is 404.
    2. use the attach code option to display code: your code in
    mangled and difficult to read
    3. when using the "new" constructor you should use
    parentheses following the class name. (eg, _global.nameAR = new
    Array(); )
    4. the usual problem is asynchronous (and delayed) loading
    when an application is placed online. that doesn't appear to be
    your problem, but it's difficult to read your code and quickly spot
    that. the 2nd most common problem would be a typo. (eg,
    "teamTSI_en.xml" should be "teamTSI_EN.xml" )

  • Adding a button in an Advanced Data Grid that calls a AS function

    I'm having a bit of trouble with this... maybe I'm missing something elementary.
    I have a data grid that populates.  I'd like to make the first column that currently displays the an ID display a button that executes a function that acts on the passed ID.
    I can get the button to display, but when I click it, I get an error:
    ReferenceError: Error #1069: Property userlistDeleteUserFunc not found on Main and there is no default value.
    at userGrid/__lblData_click()[C:\Users\Mike\\src\userGrid.mxml:7]
    So the grid looks like this:
    Main.mxml:
    <script tags...>
    private function userlistDeleteUserFunc(id:Number):void{
    Alert.show(id.toString());
    </script tags>
    <mx:AdvancedDataGrid x="10" y="12" id="userlistgrid" width="808" height="348" dataProvider="{userlistdata}" selectionMode="multipleCells" editable="true" enabled="true" sortableColumns="true">
    <mx:columns>
    <mx:AdvancedDataGridColumn width="90" dataField="id" headerText=" " editable="false" />
    <mx:AdvancedDataGridColumn headerText="Username" dataField="username" editable="false"/>
    <mx:AdvancedDataGridColumn headerText="Last Name" dataField="last" editable="true"/>
    <mx:AdvancedDataGridColumn headerText="First Name" dataField="first" editable="true"/>
    <mx:AdvancedDataGridColumn headerText="Email Address" dataField="email" editable="true"/>
    <mx:AdvancedDataGridColumn headerText="Phone" dataField="phone" editable="true"/>
    </mx:columns>
    <mx:rendererProviders>
    <mx:AdvancedDataGridRendererProvider dataField="id" renderer="userGrid" columnIndex="0" />
    </mx:rendererProviders>
    </mx:AdvancedDataGrid>
    And the renderer:
    userGrid.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <s:MXAdvancedDataGridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
      xmlns:s="library://ns.adobe.com/flex/spark"
      xmlns:mx="library://ns.adobe.com/flex/mx"
      focusEnabled="true">
    <s:Label text="{data.id}"/>
    <s:Button id="lblData" top="0" left="0" right="0" bottom="0" label="Delete" click="{parentApplication.userlistDeleteUserFunc(data.id)}" />
    </s:MXAdvancedDataGridItemRenderer>

    Please help me !!!! I have been stuck up with this issue for the past two days and I need to atleast figure out if this is possible or not in the first place.

  • Data Grid XML filtering

    I cant sem to figure out how to filter my XML data before entering my data grid. I want to load only the XML data with the ID attribute "BALUSTER" and have tried entering:
    data_grid.dataProvider = dp.(@ID == "BALUSTER");
    into my xmlLoaded function without any success.  I am fairly new to as3 and could definitely use the help.  Thanks.
    var dpataProvider;
    var products_xml:XML;
    var xmlReq:URLRequest = new URLRequest("data/products.xml");
    var xml_loader:URLLoader = new URLLoader();
    function xmlLoaded(event:Event):void {
    var ldr:URLLoader = event.currentTarget as URLLoader;
    var xmlDP:XML = new XML(ldr.data);
    dp = new DataProvider(xmlDP);
    data_grid.dataProvider = dp;
    xml_loader.load(xmlReq);
    xml_loader.addEventListener(Event.COMPLETE, xmlLoaded);

    Hard to say without seeing your xml, but something along these lines might work for you:
    import fl.data.DataProvider;
    var rawXml:XML =
    <xml>
    <item ID="BALUSTER">
      <moniker>bubba</moniker>
      <age>50</age>
    </item>
    <item ID="BALUSTER">
      <moniker>bobby-sue</moniker>
      <age>13</age>
    </item>
    <item ID="BULLUSTER">
      <moniker>boo</moniker>
      <age>25</age>
    </item>
    </xml>;
    // use a second XML object to hold the selected nodes
    var data:XML = <data/>;
    data.setChildren(rawXml.item.(@ID == "BALUSTER"));
    var dp:DataProvider = new DataProvider(data);
    data_grid.dataProvider = dp;

  • How to calculate number of data records in a XML output file

    Hi,
    After generating a XML output file from Oracle Reports, I want to calculate number of records in the XML file. Is it possible? Specifically, I want to calculate number of records for a group variable ( organization_id, which I use for bursting).
    Thanks for the help.

    Thanks BIPuser. It is useful for me.
    I can use this xsl function within the template. However, I'm also looking to print this in the concurrent request log file. So, outside of rtf template, id there any PL/SQL based XML functions I can use to count the number of records.
    Thanks.

  • Encapsulating Data in XML Output in CDATA tags

    Hi,
    I have a simple pdf fillable form that I created in LiveCycle Designer ES that saves/submits form data as XML for parsing into a database.  The database parser requires all form data to be encapsulated into CDATA tags inside the XML fieldnames or it will not process it.  Can anyone give some pointers to force the XML output to encapsulate the data inside CDATA tags within the XML fieldnames in my output XML file?  Thanks.
    Dan

    Hi Dan,
    Can you post a sample of what you want the xml to look like.  If I understand correctly, it sounds like a very strange parser.  I would imagine you would have to preprocess the xml on the server.
    Regards
    Bruce

  • How can change the font in the script output and the data grid ?

    How can change the font in the script output and the data grid in Sql Developer?

    You can't easily unless you have the latest version (2.1.1).
    If you do have this version then changing the font in the Tools/Preferences menu under the code editor/fonts section will also change the font of the data grid.
    For details of changing the fonts in an earlier version then see Sue's post below.
    http://sueharper.blogspot.com/2010/03/back-to-basics-changing-font-setting-in.html

  • Data grid, remote xml, crossdomain.xml

    Hi...
    I have a problem with the security sandbox of the flash player.
    I need a data grid to get its data from a xml located in other domain. I have prepared a crossdomain.xml file with this structure:
    <?xml version="1.0"?>
    <!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
    <cross-domain-policy>
    <allow-access-from domain="*"/>
    </cross-domain-policy>
    </cross-domain-policy>
    I have put this file in the public_html folder of my host, and also in the folder where the app is located but still not working....
    I guess I need to do something else....
    Thank you very much.

    Hi there,
    I am looking for a solution like yours, but it seems that
    flex does not like much the XML attributes nor xpath syntax.
    As a workaround, I would modify your source XML to be
    <row>
    <column>
    <dataGridHeader1>Test Data 1.1</dataGridHeader1>
    </column>
    <column>
    <dataGridHeader2>Test Data 1.2</dataGridHeader2>
    </column>
    </row>
    This way, you can take the appropriate value by describing
    <mx:DataGridColumn
    headerText="{dataXML.column.dataGridHeader1}"
    dataField="{column[0]}"/>
    <mx:DataGridColumn
    headerText="{dataXML.column.dataGridHeader2}"
    dataField="{column[1]}"/>
    Hope it helps. Let me know if you find the REAL solution to
    read attributes and Xpath,
    Best regards,
    Miguel

  • R12 Check Printing Need XML output for seeded data definition--urgent

    Hi--
    I really need to get ahold of the XML output from the checks running off the data definition called "Oracle Payments Funds Disbursement Payment Instruction Extract 1.0" in Oracle R12 quickly--particulary the XML tag that holds the MICR string (should be the concatenation of Check Number, Routing and Acct number).
    I found an entry here in the forums about running a query of:
    SELECT XMLType.getClobVal(instruction)
    FROM IBY_XML_FD_INS_1_0_V
    WHERE rownum =1 ;
    to get the entire XML output. I have an open SR but haven't really gotten anywhere with it yet.
    However, all we get back is an error about datatype. Could someone please help out with this--it is quite urgent as I need to finish this last piece of the checks and work with the bank on formatting this week.
    Thanks--I'd really appreciate any assistance!
    Kate

    SELECT XMLType.getClobVal(instruction)
    INTO x_extract_doc
    FROM iby_xml_fd_ins_1_0_v
    WHERE payment_instruction_id = p_payment_instruction_id;
    or you can use
    SELECT document FROM iby_trxn_documents order by creation_date desc;
    provided that the last run was urs.

  • Unable to use the Copy function while submitting the program for XML output

    Hi
    when i submit the concurrent program with XML output type, getting the output..
    when i submit he concurrent program using the copy button not able to get the output,
    my observation
    while submitting the program the xml template is not called....
    Diagnostics--> view xml -- able to view the ouput.
    do let me know if any of the steps is missing while registration in the xml responsibility..
    this is only with the custom conc program.. the standard program is working fine...
    do help me out..
    Regards
    Yram

    It's really a little difficult to answer your question without a bit more information. What version of JDeveloper are you using? What's your technology stack?
    If this is JDeveloper 11+g+, with the Fusion technology stack, you can use a technique like the one described here:
    http://groundside.com/blog/GrantRonald.php?title=jdeveloper_11_business_services_cascadin&more=1&c=1&tb=1&pb=1
    If it's JDeveloper 10.1.3, with the default Web technology stack, look here:
    http://radio.weblogs.com/0118231/stories/2004/09/23/notYetDocumentedAdfSampleApplications.html#62
    If, as it looks like, this is really a question about generic JSPs (no JSF), you might actually have a bit more success on a generic JSP forum--using scriptlets hasn't really been best practices within JDev since...well, since JSTL became available, really. That was a number of years ago.
    Like I said, there's really no direct way to use Javascript output in a scriptlet--unless you mean something like storing Javascript output in a hidden field, and using the value in a scriptlet on the next request. But by the time Javascript runs, any scriptlet from the current request will already have executed.

Maybe you are looking for