Get DS data as JS var

Hi guys!
I think this one is pretty simple: is there a way to fetch
data from a spry dataset and pass it as a javascript variable? I'm
trying something along these lines :
var ds1 = new Spry.Data.XMLDataSet("config.xml",
"config/pagesize");
var data = ds1.getData(true);
var test = data.length;
document.write(test);
config.xml looks like this:
<config>
<pagesize>3</pagesize>
</config>
I want to fetch the actual "3" that is contained within the
tags, and not use data.length, but I can't seem to do it, so I'm
clearly doing something wrong... I tried data.value, which is as
far as my javascript would allow me to go, but I get "undefined"...
Thanks in advance,
Tomas

var ds1 = new Spry.Data.XMLDataSet("data/config.xml",
"config");
ds1.loadData();
function xx(){
var data = ds1.getData();
if(data){
var pagesize = data[0]['pagesize'];
document.write(pagesize);
//-->
</script>
</head>
<body>
<a href="#" onclick="xx();">dd</a>
A couple things.
If you don't have a region on the page, the data isn't loaded
automatically.
Therefore, I had to call loadData();
Also, if you run the script straight, like you are doing, the
data set might not be loaded when it hits your function, and
therefore will be undefined.
I ran it as a function because it was easier and I knew the
data would be loaded.
Otherwise, you can set up on observer that fires onPostLoad
and then run your function. The end result is the same: wait till
the data set is loaded.
If you have a region, the data is loaded automatically, and
you won't need loadData();
Hope this helps,
Don

Similar Messages

  • Application process is not getting the data from table

    I have created the following application process based on AJAX select value but using a pop up LOV
    DECLARE
    my_det VARCHAR2 (200);
    BEGIN
    SELECT DM_00010_CUST_NAME INTO my_det
    FROM ODM_MD_00010
    WHERE DM_00010_CUST_CODE = nvl(:P11_DT_00020_CUST_CODE,21);
    exception when no_data_found then null;
    HTP.prn (my_det);
    END;
    the process is getting no data found error ( hence the exception) so I am getting NULL in the name field on screen.
    any help ?

    the javascript I have in the region header is:
    <script language="JavaScript" type="text/javascript">
    function f_getDet ()
    var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=getDet',0);
    get.add('P11_DT_00020_CUST_CODE',html_GetElement('P11_DT_00020_CUST_CODE').value)
    gReturn = get.get();
    if(gReturn)
    {  html_GetElement('P11_DT_00020_CUST_NAME').value = gReturn  }
    else
    {  html_GetElement('P11_DT_00020_CUST_NAME').value = 'null'  }
    get = null;
    </script>

  • The problem here is i am not able to get the data from the list

    hi all,
    i have the following code
    EnrichedProductCatalogue enrichedProductCatalogue1 = new EnrichedProductCatalogue();
    enrichedProductCatalogue1.setAssetCount(2);
    enrichedProductCatalogue1.setBlockingProduct("Weekend Freebee");
    enrichedProductCatalogue1.setBlockingReason("Compatability");
    ArrayList<String> availableActionsList = new ArrayList<String>();
    availableActionsList.add(EnrichedProductConstants.ADD.toString());
    availableActionsList.add(EnrichedProductConstants.REMOVE.toString());
    enrichedProductCatalogue1.setAvailaibleActions((ArrayList<String>)availableActionsList);
    BundleProduct bundleProduct = null;
    Product product = new Product();
    product = new Product();
    product.setProductName("International");
    product.setProductClassName("International");
    ArrayList<UiCategory> uiCategory = new ArrayList<UiCategory>();
    UiCategory uiCategory1 = new UiCategory();
    uiCategory1.setCategoryName("Simply");
    UiCategory uiCategory2 = new UiCategory();
    uiCategory2.setCategoryName("Freebees");
    uiCategory.add(uiCategory1);
    uiCategory.add(uiCategory2);
    product.setUiCategory(uiCategory);
    bundleProduct = new BundleProduct();
    bundleProduct.setCommercialProduct(product);
    enrichedProductCatalogue1.setBundleProduct(bundleProduct);
    listOfEnrichProducts.add(enrichedProductCatalogue1);
    listOfEnrichProducts.add(enrichedProductCatalogue1);
    here i have an list called listOfEnrichProducts.
    here i am adding two objects of enrichedProductCatalogue.
    which contains a object called BundleProduct.
    which has a reference for Product class.
    here this product class has a list which contains objects of another class called UiCategory.
    the problem here is i am not able to get the data from the list which contains UiCategory objects .
    the following is the UI
    <af:table var="row" rowBandingInterval="0" id="t1"
    value="#{pageFlowScope.sample1}"
    binding="#{pageFlowScope.sampleManagedBean.dataTable}"
    partialTriggers="apimethods ::apimethods">
    <af:column sortable="false" headerText="ProductName" id="c2">
    <af:outputText value="#{row.bundleProduct.commercialProduct.productName}" id="ot15"/>
    </af:column>
    <af:column sortable="false" headerText="ProductClass" id="c12">
    <af:outputText value="#{row.bundleProduct.commercialProduct.productClassName}" id="ot19"/>
    </af:column>
    <!--
    <af:column sortable="false" headerText="UICategoryName" id="c32">
    <af:forEach var="item" items="#{row.bundleProduct.commercialProduct.uiCategory}" >
    <af:outputText value="#{item.categoryName}" id="ot119"/>
    </af:forEach>
    </af:column>
    -->
    <af:column sortable="false" headerText="AssetCount" id="c22">
    <af:outputText value="#{row.assetCount}" id="ot1"/>
    </af:column>
    <af:column sortable="false" headerText="blockingReason" id="c3">
    <af:outputText value="#{row.blockingReason}" id="ot2"/>
    </af:column>
    <af:column sortable="false" headerText="blockingProduct" id="c4">
    <af:outputText value="#{row.blockingProduct}" id="ot3"/>
    </af:column>
    <!--<af:column sortable="false" headerText="availaibleActions" id="c1">
    <af:commandButton text="#{row.availaibleActions}" id="cb1"
    actionListener="#{pageFlowScope.sampleManagedBean.callAction}"
    partialSubmit="true">
    <af:setPropertyListener from="#{row.availaibleActions}"
    to="#{pageFlowScope.avalibleaction}" type="action"/>
    </af:commandButton>
    </af:column>-->
    </af:table>
    Can anyone pls give some solution ...

    Hi Frank,
    value="#{pageFlowScope.sample1}"
    here sample is
    Map<String, Object> flowScope1 =
    ADFContext.getCurrent().getPageFlowScope();
    flowScope.put("sample1", listOfEnrichProducts);
    this is not the problem . i am able to get all the values except the following .
    ArrayList<UiCategory> uiCategory = new ArrayList<UiCategory>();
    UiCategory uiCategory1 = new UiCategory();
    uiCategory1.setCategoryName("Simply");
    UiCategory uiCategory2 = new UiCategory();
    uiCategory2.setCategoryName("Freebees");
    uiCategory.add(uiCategory1);
    uiCategory.add(uiCategory2);
    product.setUiCategory(uiCategory);

  • XML..: Problem getting the data in the XML-file..

    I'm developing a flash-file for my customer to use when
    displaying list of products he's selling.
    His list of products is inside a XML-file and he want me to
    display an overview of the products inside a datagrid, so when you
    click on the product you're interested in the productinfo will be
    displayed.
    But.. I'm having problems grabbing the data I want as it
    seems to me that I have to use the unik ID's for each products to
    get the data I want. I've tried adding the unik ID-code to my
    action script but it still won't work.
    Here's a part of the XML-code:
    <Tooldata>
    <Store name="N/A" zipcode="0033450" city="N/A" url="N/A"
    phone="N/A" fax="N/A" email="N/A">
    <Tool unikID="5_0022" control="14" cmnd="update">
    <Toolgroupe>Hammer</Toolgroupe>
    <Brand>Knipps</Brand>
    <Model>K55_Knipps</Model>
    <Price>35€</Price>
    <Weight>N/A</Weight>
    <Soldout>0</Soldout>
    <Color>Red/Black</Color>
    <Images>
    <Images image="5_0022.jpg" prioritet="1" gen_id="16"
    desc="MainImage"/>
    <Images image="5_0022_1.jpg" prioritet="2" gen_id="16"
    desc="Image 1"/>
    <Images image="5_0022_2.jpg" prioritet="3" gen_id="16"
    desc="Image 2"/>
    <Images image="5_0022_3.jpg" prioritet="4" gen_id="16"
    desc="Image 3"/>
    </Images>
    Now, the code above is only one item/product. But there are
    several proucts listed in the XML-file and I find it hard to get
    the product and the product info that I want to be displayed.
    Here's my action script:
    var xmlLoader:URLLoader = new URLLoader();
    var xmlData:XML = new XML();
    xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
    xmlLoader.load(new URLRequest("ToolData.xml"));
    function LoadXML(e:Event):void {
    xmlData = new XML(e.target.data);
    ParseBildata(xmlData);
    function ParseTooldata(TooldataInput:XML):void {
    trace("XML Output");
    trace("------------------------");
    trace(TooldataInput.Store);
    If I want to trace the images I just write
    "trace(TooldataInput.Store.Images);
    But if I want to trace one unik tool it's impossible. Well,
    maybe not impossible.. I just don't know how to do just that.
    When you trace (TooldataInput.Store); you get all the tools
    at that store. But how do I trace only one tool using the unikID??
    Thanks a lot in advance!

    Ace,
    When using E4X if you have multiple nodes at the same level
    you should be able to access them as an XMLList. Looking at your
    XML you should be able to access each <Tool> node as:
    TooldataInput.Store.Tool[0];
    TooldataInput.Store.Tool[1];
    or as an entire list
    TooldataInput.Store.children()
    WL

  • ADF and JQuery: How can I get the data back to server listener.

    Jdeveloper 11g Version 11.1.1.2.0
    I use Jquery to draw the signature. How can I get the svgOutput back to my server listener.???
    e.getSource give me the error e.getSource is not function.
    Both of function saveSignatureCapture(which calling from ADF button) and $('#save-output').click(function (event) can not send the the data back to my server listener.
    Thanks.
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <jsp:directive.page contentType="text/html;charset=UTF-8"/>
      <f:view>
        <af:document id="dSignature" title="Signature Capture">
          <af:resource type="javascript" source="../resources/lib/jquery/jquery-1.4.2.min.js"/>
          <af:resource type="javascript" source="../resources/js/jquery.drawbox.js"/>
          <af:resource type="javascript">
            var svgOutput = '';
            function saveSignatureCapture(e) {
                var signatureText = $('#drawbox-data').val();
                var source = e.getSource();
                var type = 'saveSignatureCapture_ServerListener';
                var immediate = true;
                var params = {
                    signatureText : signatureText
                AdfCustomEvent.queue(source, type, params, immediate);
            function beginSignatureCapture(e) {
                $('#drawbox').drawbox( {
                    caption : 'This is a caption', lineWidth : 3, lineCap : 'round', lineJoin : 'round', colorSelector : true
                $('#view-output').click(function () {
                    svgOutput = window.open('data:image/svg+xml,' + $('#drawbox-data').val());
                    svgOutput.document.close();
                    return false;
                $('#save-output').click(function (event) {
                    var signatureText = $('#drawbox-data').val();
                    var source = $(document);
                    var type = "saveSignatureCapture_ServerListener";
                    var immediate = true;
                    var params = {
                        signatureText : signatureText
                    AdfCustomEvent.queue(source, type, params, immediate);
                    return false;
            $(document).ready(beginSignatureCapture);
          </af:resource>
          <af:panelStretchLayout id="psSignature">
            <f:facet name="bottom"/>
            <f:facet name="center">
              <af:panelGroupLayout id="pgSignature" layout="vertical">
                <f:verbatim>
                  <div id="divSignature">
                    <canvas id="drawbox" width="600" height="200">
                      <p>Your browser does not support &lt;canvas&gt;</p>
                    </canvas>
                  </div>
                  <br/>
                  <br/>
                  <a href="#" id="view-output">View Rendered SVG Output</a>
                  <br/>
                  <br/>
                  <a href="#" id="save-output">Save Signature</a>
                </f:verbatim>
                <af:spacer width="10" height="10" id="s10"/>
                <af:panelGroupLayout id="pghl14" layout="horizontal" halign="center">
                  <af:commandButton text="Save Signature" id="cbSaveSignatureButtonId" partialSubmit="true">
                    <af:clientListener method="saveSignatureCapture" type="click"/>
                    <af:serverListener type="saveSignatureCapture_ServerListener"
                                       method="#{backingBeanScope.mainBackingBean.saveSignatureCapture_ServerListener}"/>
                  </af:commandButton>
                </af:panelGroupLayout>
              </af:panelGroupLayout>
            </f:facet>
            <f:facet name="start"/>
            <f:facet name="end"/>
            <f:facet name="top"/>
          </af:panelStretchLayout>
        </af:document>
      </f:view>
    </jsp:root>Edited by: user553450 on Sep 17, 2010 4:02 PM
    Edited by: user553450 on Sep 17, 2010 4:13 PM

    Hi Frank,
    Thank you so much for your advice, I got lot of knowledge from your book and articles since I am in transition from forms to JDeveloper.
    By surrounding <af:panelStretchLayout id="psSignature"> with <af:form id="f1">
    Now the following code is work on Firefox, everything fine, I can get the data back and call my server listener as I expected.
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <jsp:directive.page contentType="text/html;charset=UTF-8"/>
      <f:view>
        <af:document id="d1" title="Signature Capture">
          <af:resource type="javaScript" source="../resources/js/excanvas.js"/>
          <af:resource type="javascript" source="../resources/lib/jquery/jquery-1.4.2.min.js"/>
          <af:resource type="javascript" source="../resources/js/jquery.drawbox.js"/>
          <af:resource type="javascript">
            function saveSignatureCapture(e) {
                var signatureText = $('#drawbox-data').val();
                alert(signatureText);
                var source = e.getSource();
                var type = 'saveSignatureCapture_ServerListener';
                var immediate = true;
                var params = {
                    signatureText : signatureText
                AdfCustomEvent.queue(source, type, params, immediate);
            function beginSignatureCapture(e) {
                var cmd = "$('#drawbox').drawbox({lineWidth:3,lineCap:'round',lineJoin:'round',colorSelector:true});";
                if (navigator.userAgent.indexOf('MSIE') !=  - 1) {
                    setTimeout(cmd, 1000);
                else {
                    $('#drawbox').drawbox( {
                        caption : 'This is a caption', lineWidth : 3, lineCap : 'round', lineJoin : 'round', colorSelector : true
          </af:resource>
          <af:form id="f1">
            <af:panelStretchLayout id="psSignature">
              <f:facet name="bottom"/>
              <f:facet name="center">
                <af:panelGroupLayout id="pgSignature" layout="vertical">
                  <f:verbatim>
                    <canvas id="drawbox" width="600" height="200">
                      <p>Your browser does not support &lt;canvas&gt;</p>
                    </canvas>
                  </f:verbatim>
                  <af:spacer width="10" height="10" id="s10"/>
                  <af:panelGroupLayout id="pghl14" layout="horizontal" halign="center">
                    <af:commandButton text="Save Signature" id="cbSaveSignatureButtonId" partialSubmit="true">
                      <af:clientListener method="saveSignatureCapture" type="click"/>
                      <af:serverListener type="saveSignatureCapture_ServerListener"
                                         method="#{backingBeanScope.mainBackingBean.saveSignatureCapture_ServerListener}"/>
                    </af:commandButton>
                  </af:panelGroupLayout>
                </af:panelGroupLayout>
              </f:facet>
              <f:facet name="start"/>
              <f:facet name="end"/>
              <f:facet name="top"/>
            </af:panelStretchLayout>
          </af:form>
          <af:clientListener method="beginSignatureCapture" type="load"/>
        </af:document>
      </f:view>
    </jsp:root> However, I got the error following error when I run the page from IE8.
    Assertion failed: Incorrect use of AdfRichUIPeer.GetDomNodeForCommentComponent.AdfRichCommandButton[oracle.adf.RichCommandButton] id=cbSaveSignatureButtonId StackTrace:function(x217)[AdfRichCommandButton[oracle.adf.RichCommandButtonId]..........
    FYI, the following simple testing code has the similar error in IE8 too (not for Firefox).
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <jsp:directive.page contentType="text/html;charset=UTF-8"/>
      <f:view>
        <af:document id="d1">
          <af:resource type="javaScript" source="../resources/js/excanvas.js"/>
          <af:form id="f1">
            <f:verbatim>
              <canvas id="drawbox" width="600" height="200">
                <p>Your browser does not support &lt;canvas&gt;</p>
              </canvas>
            </f:verbatim>
          </af:form>
        </af:document>
      </f:view>
    </jsp:root>The error is: Assertion failed: Incorrect use of AdfRichUIPeer.GetDomNodeForCommentComponent.AdfRichDialog[oracle.adf.RichDialog] id:::msgDlg StackTrace function(x217).......
    Your advice is very much appreciated.

  • How to get a date on different pages?

    Hey everyone, I am working on a daily planner for the office and have a script that automatically generates the dates but I don´t know how to get each of the dates on a different page. I'd really appreciate if anyone could help me get each date generated by the script on teh following page of my 365 page document. The scrip is:
    var months = [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ];
    var length = [ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ];
    var days = [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ];
    count = 0;
    day = 0;
    month = 0;
    weekday = 5;
    str = "";
    while (count < 365)
    count++;
    str += days[weekday]+", "+(day+1)+" "+months[month]+"\r";
    day++;
    if (day >= length[month])
      day = 0;
      month++;
      if (month > 11)
       month = 0;
    weekday = (weekday+1) % 7;
    app.selection[0].contents = str;
    Tanks!

    Try this,
    app.activeDocument.viewPreferences.rulerOrigin = RulerOrigin.pageOrigin;
    app.activeDocument.zeroPoint = [0,0];
    with(app.activeDocument.viewPreferences){
        horizontalMeasurementUnits=MeasurementUnits.points;
        verticalMeasurementUnits=MeasurementUnits.points;
        rulerOrigin=RulerOrigin.pageOrigin;
    var months = [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ];
    var length = [ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ];
    var days = [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ];
    count = 0;
    day = 0;
    month = 0;
    weekday = 5;
    str = [];
    while (count < 365)
    count++;
    str[count]= days[weekday]+", "+(day+1)+" "+months[month]+"\r";
    str1 =str.toString();
    day++;
    if (day >= length[month])
      day = 0;
      month++;
      if (month > 11)
       month = 0;
    weekday = (weekday+1) % 7;
    for(i=0;i<document.pages.length;i++)
    var myTextframe = document.pages[i].textFrames.add({geometricBounds:[0,0,50,150]});
    myTextframe.insertionPoints[0].contents=str[i+1];
    Vandy

  • How do I initialize an array after getting xml data via httpservice?

    I am having a problem trying to initialize an array with data from an external xml file obtained via httpservice.  Any help/direction would be much appreciated.  I am using Flex 4 (Flash Builder 4).
    Here is my xml file (partial):
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Root>
        <Row>
            <icdcodedanddesc>00 PROCEDURES AND INTERVENT</icdcodedanddesc>
        </Row>
        <Row>
            <icdcodedanddesc>00.0 THERAPEUTIC ULTRASOUND</icdcodedanddesc>
        </Row>
        <Row>
            <icdcodedanddesc>00.01 THERAPEUTIC US VESSELS H</icdcodedanddesc>
        </Row>
        <Row>
            <icdcodedanddesc>00.02 THERAPEUTIC ULTRASOUND O</icdcodedanddesc>
        </Row>
    </Root>
    Here is my http service call:
    <s:HTTPService id="icdcodeservice" url="ICD9V2MergeNumAndDescNotAllCodes.xml"
                           result="icdcodesService_resultHandler(event)" showBusyCursor="true"  />
    (I have tried resultFormat using object, array, xml).
    I am using this following Tour de Flex example as the base -http://www.adobe.com/devnet-archive/flex/tourdeflex/web/#docIndex=0;illustIndex=1;sampleId =70500
    and updating it with the httpservice call and result handler.  But I cannot get the data to appear - I get [object Object] instead.  In my result handler code  I use "icdcodesar = new Array(event.result.Root.Row);"  and then "icdcodesar.refresh();".
    The key question is: How to I get data from an external xml file into an array without getting [object Object] when referencing the array entries.  Thanks much!
    (Tour de Flex example at http://www.adobe.com/devnet-archive/flex/tourdeflex/web/#docIndex=0;illustIndex=1;sampleId =70500  follows)
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx"
                   xmlns:local="*"
                   skinClass="TDFGradientBackgroundSkin"
                   viewSourceURL="srcview/index.html">
        <fx:Style>
            @namespace s "library://ns.adobe.com/flex/spark";
            @namespace mx "library://ns.adobe.com/flex/mx";
            @namespace local "*";
            s|Label {
                color: #000000;
        </fx:Style>
        <fx:Script>
            <![CDATA[
                import mx.collections.ArrayCollection;
                private var names:ArrayCollection = new ArrayCollection(
                    ["John Smith", "Jane Doe", "Paul Dupont", "Liz Jones", "Marie Taylor"]);
                private function searchName(item:Object):Boolean
                    return item.toLowerCase().search(searchBox.text) != -1;
                private function textChangeHandler():void
                    names.filterFunction = searchName;
                    names.refresh();
                    searchBox.dataProvider = names;
                private function itemSelectedHandler(event:SearchBoxEvent):void
                    fullName.text = event.item as String;   
            ]]>
        </fx:Script>
        <s:layout>
            <s:HorizontalLayout verticalAlign="middle" horizontalAlign="center" />
        </s:layout>
        <s:Panel title="Components Samples"
                 width="600" height="100%"
                 color="0x000000"
                 borderAlpha="0.15">
            <s:layout>
                <s:HorizontalLayout horizontalAlign="center"
                                    paddingLeft="10" paddingRight="10"
                                    paddingTop="10" paddingBottom="10"/>
            </s:layout>
            <s:HGroup >
                <s:Label text="Type a few characters to search:" />
                <local:SearchBox id="searchBox" textChange="textChangeHandler()" itemSelected="itemSelectedHandler(event)"/>
            </s:HGroup>
            <mx:FormItem label="You selected:" >
                <s:TextInput id="fullName"/>
            </mx:FormItem>
        </s:Panel>
    </s:Application>

    Hello,
    Instead of extracting the first zero element from the vid array, you should take that out and connect it allone.
    Attachments:
    init.bmp ‏339 KB

  • How to get cell data of datagrid?

    I try to get data of first cell in a row when user clicks on
    any row in the datagrid. It might be simple but I can not do it.
    Please tell me how to do.
    Thank in advance.

    private function onChange(event:Event):void
    // Get selected datagrid row item
    var selectedRow:Object = event.target.selectedItem;
    <mx:DataGrid id="allDatagrid"
    selectable="true"
    height="75%"
    fontSize="11"
    dropShadowEnabled="true"
    change="onChange(event)">
    </mx:DataGrid>

  • How would I get the date of last Monday?

    How would I get the date of last Monday?

    I've done the following, does it seem right?
    public static const millisecondsPerDay:int = 1000 * 60 * 60 *
    24;
    * This function sets the mimimum and maximum range
    private function sliceChartWeek():void{
    var max:Date = new Date();//current date is our max from
    which we will calculate the min
    var day:uint = max.day;
    var min:Date = new Date(max.getTime() - (millisecondsPerDay
    * (max.day - 1)));
    dateTimeAxis.minimum = min;
    }

  • How do u get the data from server? if server send by bytes?

    how do u get the data from server? if server send by bytes?
    i have tried using bufferedinputstream to get the data n getting the bytes but there is some data missing.i couldnt all data.so my image cant be display

    If you don't get helpful replies, I suggest you try to improve your question style a bit. There are many non native English speakers around here and the ability to phrase slick sentences varies. But for a start you could try to adhere to minimal English language standards like starting a sentence with an uppercase letter, and ending a sentence with a dot and a blank to separate it from the next sentence. Don't use ellipses (...) all over the place suggesting that the reader knows what you want to say. Rather please say it.
    Its is good style to only post the necessary code to understand the problem. However, the code you posted seems to be cut off too early to even get a grasp at what you are trying to achieve.
    Harald.
    BioMed Information Extraction: http://www.ebi.ac.uk/Rebholz-srv/whatizit

  • Failed to get a data set context!

    What does this mean?
    "processTokens: Failed to get a data set context!"
    Ive setup a Paged Data Set using
    var dsResults = new
    Spry.Data.XMLDataSet("/general/xml/xml_Results.php'",
    "/search_results/product");
    var pvResults = new Spry.Data.PagedView(dsResults, {
    pageSize: 7 });
    The paged data works and everything is displayed correctly
    however I receive that error message still? How do I resolve this?
    Thanks

    It typically means that you have a data reference that is
    refering to a data set that the region is not bound to, for
    example:
    <div spry:region="ds1">
    {dsFoo::bar}
    </div>
    --== Kin ==--

  • Getting a data from a grid

    Hi All
    In a grid display template i am displaying row of data (there will be one row always in this case).
    and  this grid i made it invisible
    Now i need to get the row of data and display it in the html.
    i can get the data using
    var BatchGrid = document.BatchList.getGridObject();
    var selBatch = BatchGrid.getSelectedCellValue(1);
    we cant select the row in the grid since the grid is invisble.
    How i can get the row without selecting
    Please provide your inputs
    Thanks
    Karthi D

    Hi Karthi,
    Try to use Frontpage and add XMII script assistant in front page under Tools->Add-ins.
    You can learn what all applet methods available and also object method in that.
    Like you will get information for grid applet, or icommand, iBrowser etc etc.
    That will make you easy to understand all methods available.
    There will methods available for Query template , display template etc for which Applet u select.
    Use Wizards.
    Regards
    Padma
    Edited by: Rao on May 8, 2009 11:17 AM
    Edited by: Rao on May 8, 2009 11:45 AM

  • How to get system date through forms 6i?

    Sir,
    I am trying to get system date in forms but i am getting some problem with it.
    My code is like this: I am using 6i forms with 10g database.
    SELECT SYSDATE INTO :VAR FROM DUAL;
    At the compilation it is giving error like
    ORA-00600 internal error argements
    can you help me please

    you can make this code instead of what you write in forms
    :VAR :=Sysdate;
    and make var variable of type date
    concern the error try to close the forms builder and open it again and recompile your form.
    hope this will help you

  • New Server - Not Getting Event.Data back

    Its a weird problem i'm having. I've setup a brand new server (Original was a shared hosting setup from godaddy).
    I'm using my same application
    And i'm not getting event.data info back (in XML form)
    Here's an example:
    private function onUploadCompleteData(event:DataEvent):void {
    updateStatus(event.data, _numCurrentUpload - 1);
    var x:XML = new XML(event.data.toString()); <---- NOT FIRING
    Application.application.upAvatar = "/profile/" + x.name;
    Does anyone have any ideas? I was thinking it could be a misconfiguration with my apache settings.
    I'm using:
    Ubuntu
    Apache2
    PHP5
    CURL
    Thanks..

    hi,
    have you placed a fault event handler on your request to see what error if any is being returned ?
    David.

  • Getting Tree data with a twist

    I just started playing around in flex and am excited about
    the possibilities. I read the previous question and answers on
    Getting Tree data by an HTTPService, but cannot get it to work with
    my xml data. I have an xml file which doesn't have the regular node
    tags for a tree's dataprovider. I was wondering if there was a way
    to get a tree to populate with data while using multiple tag names
    and descriptions encased within those tags. Here is an example of
    my xml data to show you what I mean:
    <?xml version="1.0" encoding="utf-8"?>
    <catalog>
    <product product="Nokia">
    <name>Nokia 6010</name>
    <description>Easy to use without sacrificing style,
    the Nokia 6010 phone offers functional voice communication
    supported by text messaging, multimedia messaging, mobile internet,
    games and more</description>
    <price>99.99</price>
    </product>
    <product product="Nokia">
    <name>Nokia 3100 Blue</name>
    <description>Light up the night with a
    glow-in-the-dark cover - when it's charged with light you can
    easily find your phone in the dark. When you get a call, the Nokia
    3100 phone flashes in tune with your ringing tone. And when you
    snap on a Nokia Xpress-on™ gaming cover*, you'll get
    luminescent light effects in time to the gaming
    action.</description>
    <price>139</price>
    </product>
    </catalog>
    Using this data, I would expect to have one folder called
    "Nokia" which has two files called "Nokia 6010" and "Nokia 3100
    Blue".
    So I have been searching the internet to see if I could get
    this xml format to work with a tree and this is the code I have so
    far:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="horizontal"
    creationComplete="treeXML.send();">
    <mx:Script>
    <![CDATA[
    public function fixLabel(item:Object):String {
    var node:XML = XML(item);
    if( node.localName() == "product" )
    return unescape(node.@product);
    else if( node.localName() == "name" )
    return unescape(node.@name);
    else
    return '';
    ]]>
    </mx:Script>
    <mx:HTTPService id="treeXML" url="data/catalog.xml"
    resultFormat="e4x"/>
    <mx:Panel width="30%" height="100%"
    layout="horizontal">
    <mx:Tree width="100%" showRoot="true"
    horizontalScrollPolicy="auto"
    height="100%" id="mytree"
    dataProvider="{treeXML.lastResult.node}"
    labelField="@name" labelFunction="fixLabel" />
    </mx:Panel>
    <mx:Panel width="70%" height="100%" id="panel1"
    layout="horizontal">
    </mx:Panel>
    </mx:Application>
    However, nothing is being populated in the tree. Can somebody
    please help me with this. I would think that this problem has been
    solved before but I don't know where to look.
    Thank you for your help.

    Thanks for the reply. I definitely couldn't come up with that
    on my own at this stage of the game. I wonder if you could answer
    two more questions. How do I tell the node.@name to be a leaf
    instead of a folder? I changed a small piece in your code to handle
    the data inside the XML tags. Now I am getting two levels of
    folders with labels on them. Thats fine but how would I get rid of
    the the rest of the folders that I don't give a label?
    Say you have the following xml data:
    <?xml version="1.0" encoding="utf-8"?>
    <program name="someprogram">
    <system name="Mechanical 1">
    <docs name="other Systems">
    <schematic name="Schematic" description="" url=""/>
    <guide name="Familiarization" url=""/>
    </docs>
    <docs name="Block Systems">
    <schematic name="Schematic" description="" url=""/>
    <guide name="Familiarization" url=""/>
    </docs>
    <docs name="Block 2">
    <schematic name="Schematic" description="" url=""/>
    <guide name="Familiarization" url=""/>
    </docs>
    <docs name="Suppressor">
    <schematic name="Schematic" description="" url=""/>
    <guide name="Familiarization" url=""/>
    </docs>
    </system>
    <system name="Mechanical 2">
    <docs name="Pneumatics">
    <schematic name="Schematic" description="" url=""/>
    <guide name="Familiarization" url=""/>
    </docs>
    <docs name="Block 1">
    <schematic name="Schematic" description="" url=""/>
    <guide name="Familiarization" url=""/>
    </docs>
    <docs name="Block 2">
    <schematic name="Schematic" description="" url=""/>
    <guide name="Familiarization" url=""/>
    </docs>
    </system>
    <system name="Electrical"/>
    </program>
    How would I bind the selected item in the tree to some text
    boxes so that the relevant descriptions and url's would show up
    depending the selection? I know how to bind data when I don't use
    the "e4x" xml data format but I can't get around it by using a
    tree.
    I would love to hear any advice you could give me.
    Thanks again.

Maybe you are looking for

  • Upgrading iPhone 3GS to iOS4 unable to import photos to iPhoto

    After upgrading my iPhone 3GS to iOS4, I am unable to import photos to iPhoto. Also, iPhone does not turn up in iPhoto. Unable to find other ways to import photos from iPhone. No problems importing before upgrade. Anyone with a god solution?

  • Can't update iPhoto/ iMovie in App Store. New Retina MBP.

    I have just purchased a new Retina MBP. App store wont let me update iPhoto/ iMovie because I'm not logged in with account that purchased the apps. I tried the 2 apple id's I have and no luck. Any advice? Thanks.

  • Payslip in PDF Format and send to mail

    Hi, I created one Payslip in SMARTFORMS, Now i want to convert into PDF Format and send as mail.... How to do Pls help me... with regards suresh Edited by: rsnaidu on Jun 28, 2011 3:28 PM

  • Problem with CONVERT_OTF, special character '-' printing not properly

    Hi experts, when printing PO item text; in Print Preview, text displays correctly. But in program by using 'CONVERT_OTF' FM output is converting into PDF and this PDF is send it to the PO creator through mail,   In the PDF present in the mail, the sp

  • Early lot creation

    Dear Gurus, When working with early lot creation, with batch management activated, if I received a partial quantity from an order, it is posted normally to quality, then I make the UD for this lot and it is closed, then if I receive another quantity