Load directly from php as a DataProvider to a datagrid

Hello

The normal method to load data from php in one datgrid is pushing in and Board first...:

for (var i: uint = 0; i < event.target.data.dgRows; i ++)

{

dgArr.push

({

ID:event.target.data ["ID" + i],

dateLogged:event.target.data ["dateLogged" + i],

quoteNumber:event.target.data ["quoteNumber" + i],

clientPoNum:event.target.data ["clientPoNum" + i],

compName:event.target.data ["compName" + i],

exclusive: Event.Target.Data ["exclusive" + i]

Tax:event.target.data ["Tax" + i],

inclusive: Event.Target.Data ["Inclusive" + i]

});

}

DG1. DataProvider = new DataProvider (dgArr);

What I want to know is if it is possible to "event.target.data" directly as a dataprovider, tried but failed for obvious reasons: DG1.dataProvider = new DataProvider (event.target.data);

Basically I want the code that does not change for each php file and reduce the amount of lines of coding, for example. I want to "dynamic": eliminate\change

"for (var i: uint = 0;". I < event.target.data.dgRows;. i ++) {dgArr.push (...); »

Something like that would be great...

(var key: string in the map)

{

dgArr.push

({

key : [key] card

});

}

(the above code will add a line for each key that actually represent a column which is totally not what is necessary and is empty because the 'key' must indicate...)

Help will be appreciated

You can use the JSON native encoding of functions in PHP to wrap your results into an object that can use the native JSON functions in AS3 decoding turn around in a table that can be used as a dataProvider.

You can of course also write logic to wrap your results as XML from PHP and use it directly as a dataProvider.

Just to set the MIME type that is appropriate for what you want to send and use the string normal receive mode. for example return to XML format and myGrid.dataProvider = XML (e.target.data); or return JSON and myGrid.dataProvider = JSON.parse (e.target.data);

Edit:

Haha you never kglad of sleep...

Tags: Adobe Animate

Similar Questions

  • Failed to load the link directly from livemail

    I can not load a link directly from livemail clicking... I use live essentials, firefox, google, avg and webroot... everything worked until a few days ago... I have no virus or malware cannot figure out needs to be simple, I clicked something I shouldn't and disabled this feature .. .all help would be greatly appreciated thank you Danny

    Hello

    See if the web browser through default programs reset fixed the problem.
    Click Start, select default programs
    Click settings by default access and computer program Set
    Click Custom, and then select the web browser
    Click OK
    Then, follow these steps:
    Click set your default programs
    Select your browser from the list
    Click set this program as default
    Click OK
  • receiving data from php

    Hey, so moving along well, just a bit stuck.  So, my first flash Web page sends the data to a php script.  I then

    var result_data:String = String(contactLoader.data);
         if (result_data == "ok")
         {
              navigateToURL(strURL, "_self");
         }
    

    So, if the data is sent without any problems, it will load up my new url.  Problem is this new url needs these data to display.  So if my php file contains variable data, how can my new url retrieve them in real time? (which means that the data are intended directly from swf to php to the new swf format)  I tried LoadVars, but do not know if it will work in real time, maybe it will be.

    Any advise appreciated.

    see you soon

    using the associative array $_SESSION is chosen on the deprecated $HTTP_SESSION_VARS.

    retrieve you the data using the same associative array.

    the only delay using a text file would be internet latency to download the text file.

  • Loading images from the camera to the Finder

    How can I load pictures from my camera directly into a folder I made on Finder?  I don't want to go through the program Foto everything first because then the photos arrive in a place that is impossible to find and manage.

    Use the Apple Image Capture app.

    Image capture: transfer images and other elements of your device

  • 80070490 how revive if bought online direct from MS Vista?

    Get the 80070490 error when you try to update (says cannot for this reason). All repair instructions say load the Vista DVD. Problem is that I bought this MS directly from their site with no. DVD because of it. So, how devil to get a copy of Vista, or what I need to solve this problem. I have my serial number for Vista

    You can try this:

    Or borrow a good Microsoft Vista DVD (not Dell, HP, Acer, recovery disk/s etc).
    A good Vista DVD contains all versions of Vista.
    The product key determines which version of Vista is installed.

    There are 2 disks of Vista: one for 32-bit operating system, and one for 64-bit operating system.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    http://support.Microsoft.com/default.aspx/KB/326246

    'How to replace Microsoft software or hardware, order service packs and upgrades, and replace product manuals'

    See you soon.

    Mick Murphy - Microsoft partner

  • Updated 10 10.3.2 for Classic purchased directly from Blackberry to blackBerry

    I'm in the Netherlands. I bought a classic Blackberry directly from Blackberry (shop.blackberry.com). Load on the device is Blackberry OS 10.3.1.1779. "Check for Updates" on the device indicates is that I have the latest software. It is updates via Blackberry link.

    Does anyone know what I need to do to upgrade to 10.3.2? I just have to wait or is there something else I can do? Given that I bought the machine directly from Blackberry my carrier should have nothing to do with this update.

    Thanks in advance.

    Hello and welcome to the community!

    First of all, there is a difference between the version of the OS and the version of the software (i.e. the value that you quoted). Reference:

    Official methods and discussions use the value of SR, while the informal methods and tools (as well as the discussions here) are the true value of the BONE. It is therefore important to understand the difference and use/quote the value that works for the post of that work.

    Second, have you done any attempt via WiFi only with your SIM card removed? Sometimes this will overcome any block your carrier can be implemented. Be sure to shut down normally, remove the SIM card, then lights up and attach to the WiFi.

    If this fails, then you should then try the LINK method (always with your SIM card removed):

    Finally, if that still fails and you want to not wait and go ahead anyway, then you must use informal methods, which are more clean and you can choose a version of the OS that maybe your carrier (or anyone they control your offers) delays in approval:

    Of course, before you start this, you want a good backup link, a manual copy of the memory of your device to your PC and complete documentation of your configuration (identification information of account, adding applications, configurations, etc.). Sometimes, restoring a backup returns unit corruption even, must be eliminated and reconfiguration from scratch can solve that.

    Be also aware of the risks of 10.3.2 however... There are two things to worry about. First of all, be 100% sure that you know your BBID identifiers... If you do not, you may make your useless device to anyone, including yourself. Second, once you move to 10.3.2, you cannot fall back to 10.3.1 or earlier, by any medium (for example, even the unofficial AutoLoaders can not overcome this restriction anti-secours).

    Good luck!

  • Loading data from Microsoft Dynamics AX via FDM

    Hello world

    I was wondering if anyone was using FDM to load data from Microsoft Dynamics AX into HFM via FDM, and how this was done. We are currently on version 11.1.2.2.0, thanks for any idea.

    The easiest way would be to get the MS Dynamics team to provide a flat file extracts the required data and then use FDM to import in HFM. There is not out of the box adapters to interface directly with MS Dynamics, but another option would be to build an integration script to interface directly with the data in the relevant MS Dynamics via FDM tables but it would be more involved and require a knowledge of the underlying database MS Dynamics, FDM scripting, dry and would be much more difficult to maintain for the average user.

  • Trunking VLAN directly from ESXi in SAN servers

    Hi all

    I think that I made a mistake in choosing to go down this path, see the details of the deployment:

    the installation of the failover network limited bandwidth to a single link (failover) instead of 2 Gbps, which can improve performance.  as the solution of trunking VLAN, however out of despair and the stress very load high,.

    I was thinking of redesigning the network all over again from scratch, using the trunking VLAN directly from Server ESXi in SAN to use 2 x 1 GB Ethernet

    cable to enhance the delivery of data to the VM without the use of any

    switch between SAN and servers.

    What is a possible solution using 2 x ESXi and iSCSI MD3000i SAN?

    Kind regards

    AWT

    Since the SAN has only had 2 NIC by controller,
    + so I guess I can provide only 2 Gbps maximum for the ESXi server +.
    + each using trunking VLAN and leave the rest unused switch ports used by the other server. +

    MD3000i does not aggregate links (like Equallogic, for example), but works with MPIO.

    MPIO ESX is NOT able to aggregate links, but he is able to use the different path for different LUN.

    So the solution is simple build at least 2 LUNS, and working with different path (the path is normally automatically selected by ESX)

    André

    * If you found this device or any other answer useful please consider awarding points for correct or helpful answers

  • Automation of FDM directly from relational tables

    Hi Experts,

    We are planning to use FDM 11.1.2 for data loading direct traction of the oracle tables and then load it (Essbase Cube) planning application (11.1.2). They want to break through to source as well.

    We want to automate this process as whenever the oracle table gets updated with new data, the FDM should run automatically and update the cube Essbase.

    Please suggest me the options to do so.

    Thanks in advance!
    Alex keny

    It all depends on how you want to schedule batch processing. If, as in my previous example, he is authorized to perform the loading of the lot at the end of day process to capture changes then you would simply plan your script updated the batch to run once per daya at a specific time. However, if you want your batch to be triggered on every event was updated on the source table, then you could do something like the following:

    (1) have a trigger on the table from data source updates separate area with a value that indicates whether an update has occurred.
    (2) have a pprocess of voting that checks this value on a regular basis
    (3) use upsShell.exe to cretae one line of command that can be used for the shot of the load a script updated the batch
    (4) If an update is indicated, then run the command-line generated at step 3

  • cannot switch from php to actionscript 3.0 variables

    I use CS3 and I write the following code to pass the variable to Flash from PHP

    ActionScript

    var myLoader:URLLoader = new URLLoader();

    myLoader.dataFormat = URLLoaderDataFormat.TEXT;

    var myRequest:URLRequest = new URLRequest ("http://localhost/moodle/value.php");

    myLoader.load (myRequest);

    myLoader.addEventListener (Event.COMPLETE, onCompleteHandler);

    var myValue: String;

    function onCompleteHandler(e:Event):void {}

    var $myvariable: URLVariables = new URLVariables (e.target.data);

    myValue = myvariable.values;

    trace (MyValue);

    }

    PHP file

    <? PHP

    ECHO ('values = 8');

    ? >

    But I always have the error and can not get the values using trace();

    Until I try to use 'myLoader.dataFormat = can;' I still get the same error.

    : Error #2101: the string passed to URLVariables.Decode must be a query string URL-encoded containing name/value pairs

    to Error$ /throwError)

    at flash.net::URLVariables/decode()

    at flash.net::URLVariables$iinit()

    at flash.net::URLLoader/flash.net:URLLoader::onComplete()

    Can someone help me?

    Rewrite your PHP...

    <>

    echo "values = 8;

    ?>

    edited: deleted information about different display

  • Loading data from DB.

    Hello!
    I have the database with 5 tables empty and cca 420 csv files.

    TABLES looks like
    Table1 (vtime, id1, id2, id3 70..)
    Table2 (vtime, 71, id72, id73... id140)
    VTIME value is in each table from 1 to 22 368 145

    CSV resembles
    CSV1 (vtime, id, x, value) [vtime is for example 1 to 53250]
    CSV420 (id, x, vtime, value) [vtime is for example 22 314 895 to 22 368 145]
    There are all the IDS of each CSV file


    What is the fastest way and to load data from csv to table?
    I wanted to use sql loader, but I can't specify something like -
    + load data from csv files 420 all and value at position 2 is (1-70) [71-140] {...}, load his value (position 3) (table 1) [table 2] {...}, rowing where vtime in the table is the same as for value(position 1) vtime + *.

    Can you help me with this please? Thank you!

    What is the fastest way and to load data from csv to table?

    Use an external table.
    In this way, you can do Oracle treat your files as if they were tables.
    You will have many more opportunities in this way.

    http://asktom.Oracle.com/pls/Apex/f?p=100:11:0:P11_QUESTION_ID:6611962171229
    http://www.Oracle-base.com/articles/9i/SQLNewFeatures9i.php#ExternalTables
    http://asktom.Oracle.com/pls/Apex/f?p=100:11:0:P11_QUESTION_ID:2754967100346565998

  • Returns an ArrayCollection from PHP collection

    Hey everybody. I'm playing with the Flex RemoteObject class. I inserted with success of data in a database. Now, I try to recover the data and set the result as a dataProvider to a DataGrid component or list. I used Charles to check if I get all the data at all, and I found that everything works fine except that I'm getting a table and not an ArrayCollection collection. I tried casting the result inside Flex, but that did not work, makes it even DataGrid empty... any suggestions?

    Here is my PHP function:

    public void getUsers()

         {

    $sql = "SELECT * FROM USERS";

    $res = mysql_query ($sql);

    $params = array();

    while ($row < mysql_fetch_array ($res))

              {

    $user = new VOUser;

    id-> $user = $row ['id'];

    $user-> name = $row ['name'];

    $user-> name = $row ['name'];

    $user-> email = $row ['email'];

    $user-> password = $row ["password"];

    -> company $user = $row ['company'];

    $user-> phone = $row ["phone"];

    $user-> fax = $row ['fax'];

    $user-> job_position = $row ["job_position"];

    $user-> Web site = $row ["Web site"];

    $user-> vat_number = $row ["vat_number"];

    $user--> ip_address = $row ["ip_address"];

    $params [] = $user;

              }

    mysql_free_result ($res);

    return $params;

         }

    While ($row = mysql_fetch_object ($result))

    {

    $tmp = new valueObject();

    $tmp-> name = $row-> name;

    etc...

    etc...

    [$processedResult] = $tmp;

    }

    Return $processedResult;

  • My iPhone will not send photos or other documents directly from in Apps

    My iPhone 5 has always been able to send photos directly from the Photo App, as well as sending PDF files directly from the Pages App or other documents from other applications. Now, it is no more the case. After hitting the "send" - button, you hear the his "Whoosh"but nothing is actually sent! ".

    I discovered only after people complained to me for not getting points I thought that I had sent.

    When you import the same documents in Mail, there is no problem at all they are sent. The problem exists only IN applications.

    I tried to restart the phone several times as well as resetting - no change.

    It isn't a question of 2 check points.

    I would be very grateful if someone knew the solution to this problem.

    See you soon!

    I think the next thing I would try is to reset all settings. Settings > general > reset > reset all settings. This will return t e the device settings, to where they were out of the box - to the factory settings. You will need to enter all the settings again including WiFi passwords.

    If this does not work, back up, restore settings, and then restore the backup. If it still does not work, restore like new.

    How to clear your iOS device and then set up as a new device or restore from backups - Apple Support

    The backup of your iPhone, iPad and iPod touch - Apple Support

    Use iTunes on your Mac or PC to restore your iPhone, iPad or iPod settings - Apple Support

  • Print directly from iPhone without internet via special Wi - Fi?

    Hello world.

    I want to print labels for shipping directly from the iPhone.

    I guess I need printer active AirPrint.

    My question is: did someone knows such printer which will also save me the need to buy a router wireless (Wi - Fi) because the printer itself creates ad-hoc or a direct wireless connection?

    Thank you very much!

    Canon offers a selection of printers that have this feature, their page can be found here. (Sorry, I live in Southeast Asia) They offer the AirPrint and functionality you described, which is not AirPrint. Personally, I use the MG7170 model. DISCLAIMER: I do not receive a financial reimbursement to promote all recommended features.

  • Export Firefox bookmarks directly from hard disk.

    Hello

    I would like to export my Firefox bookmarks directly from hard disk. Can someone advise please if this is possible and provide the instuctions?

    (Note: the export option does not work because of Windows keep crashing - cannot open Firefox at all).

    Thank you very much!

    -)

    Copy bookmarks

    To open the bookmark, Manager press the ALT or F10 to rise
    the tool, then select bookmarks. Access key is < Control >(Mac: < command >) < shift > B.

    Once the window is open, the top of the page, press the button
    Import and backup. Select export bookmarks to HTML and follow
    prompts and save it in a HTML file. Copy the file to another computer.
    Repeat the above instructions, BUT select Import Bookmarks in HTML,

Maybe you are looking for