DATA CACHED FOR OFFLINE USE

I use Flash Builder 4

I have a datagrid that uses an HTTPService php to fill with data. I'm trying to cache the data so that when the user is not connected to the internet, they can pull the latest version downloaded from the data source. I did some research and referred to this page:

http://livedocs.Adobe.com/LiveCycle/8.2/programLC/programmer/LCDs/help.HTML?content=dms_ad vanced_2.html

That seems to be for livecycle, but close to what I need to do. I've been tinkering but get errors. Has anyone seen a good tutorial or have time to guide me through to make it work.

I have an air application and my code is below:

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

< s:WindowedApplication

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

xmlns:s ="

Library://ns.Adobe.com/Flex/spark "

xmlns:MX ="

Library://ns.Adobe.com/Flex/MX "

minWidth ="

800 "minHeight =" 600 "

title ="

ORDER TEST ALPHA ver.1 "

xmlns:getOrders ="

services. "GetOrders.* "

creationComplete = "loadData () '"

>

< s:layout >

< s:BasicLayout />

< / s:layout >

< fx:Style " source = ' Main.CSS '' / > "

< fx:Script >

<! [CDATA]

Import mx.collections.ArrayCollection;

Import mx.controls.Alert;

Import mx.data.DataService;

Import mx.events.FlexEvent;

Import mx.rpc.events.FaultEvent;

Import mx.rpc.events.ResultEvent;

protected function getOrders_resultHandler(event:ResultEvent):Sub

{

orders = event.result.orders.order;

}

[

Bindable ]

private var orders: ArrayCollection collection;

private function {loadData()

techOrders.fill (orders);

}

protected function getOrders_faultHandler(event:FaultEvent):Sub

{

Alert.Show (event.fault.faultString,

"Information error" );

}

[]] >

< / fx:Script >

< fx:Declarations >

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

< s:HTTPService id=" getOrders "

URL =

http://www.website.com/mods/modsgetorders.php

result = "getOrders_resultHandler (Event)" "

Fault = "getOrders_faultHandler (Event)" "

>

< s:request xmlns = "" " >

< techId >

{techId.text}

< / techId >

< / s:request >

< / s:HTTPService >

< mx:DataService id=" techOrders "destination =" " D " />

< / fx:Declarations >

< s:Panel x=" 0 "y =" 0 "width =" 100% "height =" 100% "title =" SYSTEM of TEST " " > "

< s:Group x=" 0 " y=" 0 "width = » 100% "height = » 100% " >

< s:Label x=" 10 " y=" 14 "

Text ="

User name: "

height ="

25 "

verticalAlign ="

way " />

< s:TextInput id=" techId "

x = »

94 " y=" 14 "

width ="

101 "height =" 25 "cachePolicy =" I " " / > "

< s:Label x=" 10 " y=" 43 "

Text ="

Password: "

height ="

25 "

verticalAlign ="

way " />

< s:TextInput id=" password "

x = »

94 " y=" 43 "

width ="

101 "height = » 25 " />

< s:Button x=" 223 " y=" 10 "

Label ="

Download orders "

Click = "getOrders.Send ()" "

height ="

25 "

/ >

< mx:Button " label = ' Save "

Click = "techOrders.saveCache (ArrayCollection (currentOrders.DataProvider))" x =""

479 " y=" 10 " />

< mx:Button " label = ' Claire "

Click = "techOrders.clearCache (ArrayCollection (currentOrders.DataProvider))" x =""

479 " y=" 48 " />

< / s:Group >

< s:Group x=" 0 " y=" 87 "width = » 100 % "height = » 100 % " >

< mx:DataGrid id=" currentOrders "

y = »

0 "

height ="

300 "

dataProvider ="

{orders} "

dropShadowVisible ="

fake "

"Editable =".

fake "

"right =".

10 « gauche = » 10 "

cachePolicy ="

on "

number of lines ='

10 " >

< mx:columns >

< mx:DataGridColumn " headerText =" Assigned date "dataField =" " Date " />

< mx:DataGridColumn " headerText =" Command ID "dataField =" " orderId " />

< mx:DataGridColumn " headerText =" The road ID "dataField =" " routeId " />

< mx:DataGridColumn " headerText =" The base ID "dataField =" " storeId " />

< mx:DataGridColumn " headerText =" City "dataField =" " City " />

< mx:DataGridColumn " headerText =" State "dataField =" " State " />

< / mx:columns >

< / mx:DataGrid >

< / s:Group >

< / s:Panel >

< / s:WindowedApplication >

I've been hacking around here so some of this may seem screwed up, I apologize area just to find the missing piece!

Thank you for taking the time to read this post and for all of the suggestions you offer.

You could use the local storage of the SharedObject to avoid that the last good result the HTTPService and if there is an error, use instead of these data.

http://livedocs.Adobe.com/Flex/3/HTML/Help.HTML?content=17_Networking_and_communications_6 .html

Tags: Flex

Similar Questions

  • A Web site can store data for offline use without asking?

    In options, advanced, network, web content offline and the user data, I 'tell me when a website asks to store data for use in offline mode"checked

    And then in the box below that lists Web sites that are allowed to store data for offline use there is an entry "https://forecast.io".

    This site never asked me to store data offline, and I never did anything to him. The website showed there before, I removed it and now it's back.

    So, since I have the box checked to tell me when a site asks you, means that there is not just ask?

    Yes, a Web site can store data for offline use without asking and can do even if you have checked the option 'tell me when a website asks to store data for use in offline mode', because this option does not work correctly. See the bug: https://bugzilla.mozilla.org/show_bug.cgi?id=959985

    As far as I know, it does not mean that the site simply "did not", it's just that the option does not work (or maybe only works in the case where the data are larger than the pref in offline mode - apps.quota.warn?)

    The workaround given by cor - el above, must currently off - apps.allow_by_default set to false.

  • Looking to download a track from cc App and then install it on the personal computer for offline use. Is this possible?

    Looking to download a track from cc App and then install it on the personal computer for offline use. Is this possible?

    Yes, download Adobe Creative Cloud apps | CC free trial Adobe

    but you have to be online to install applications.

  • Download of online content for offline use

    Hello community

    Adobe Premiere Elements 12 concerns: complete independence from the internet

    Is there a way how I can download all the additional content that comes with my driver's license at the time of the server so I always all the features of the applications available offline on my computer while I am travelling out of the roads? Can someone please give instructions on how make that (i.e. related content to download such as music, title templates, etc..). It goes same for online help: which is downloadable from the server for offline by any chance at all?

    I would be quite grateful for your help. Thank you all and cordially /abel

    abelch

    With regard to the online help, I suggest that you consider to download the first 12 support PDF and organizing elements 12 help PDF.

    Archive for first Elements 12 help PDF

    and

    Archive for organizing items 12 help PDF

    Just in the note on the case, if you uninstall / reinstall the program, I found that the content that you have downloaded to complete the class download of the content of the material will have disappeared. I suggested to save the on-line 'complete' file and use it to replace the folder 'incomplete' online that shows when the uninstall/reinstall.

    RTA Premiere Elements troubleshooting: PE11: no disc content - content downloads of Adobe

    Applies to 11, 12 and 13.

    Another case where note, I found that when you're in one of the categories, for example a Flash movie, 'Download all' applies to themes under instant film and does not download content material in other categories such as the titles of the texts &, etc. - each category must 'Download all' If you want that the options in this category.

    Please consider.

    Thank you.

    RTA

  • Trajan Pro for offline use

    One knows if it is possible to buy whole Trajan Pro for use in offline mode?

    Trajan Pro is available at MyFonts, and the latest version of Trajan Pro 3 is available at Fontspring.

  • Conservation of data form for later use

    Hello, all,.

    I know that this question is not really belong here, but the general development forum is dead (I already asked a question-no answer), and users more intelligent that I interact with are in this forum, in any case.  So, please forgive the audacity to ask this question here and please do not move to another jurisdiction.

    I was responsible for establishing a form so that a user can check a checkbox that will save the form for reuse later.  The user can give it a name, and it will appear in a menu drop-down SELECT future visits.

    What I have in mind (and I did, so far) is to use jQuery.serializeArray () and JSON.stringify () to save form fields and string data in a column of a database table.  So far so good.

    However, on chain of such recovery, displaying in the browser and using JSON.parse () to turn this data into an object, I am facing some real difficulties in filling the data in the form.

    The code I have, so far, is not that I am working on the form - I created a dummy form just to get this code works and it will transfer to the form of production as soon as I have this job.

    I'll try to get the code of my dev environment (isolated from the internet) to power post it here.  I'll be right back.  (If I'm sitting here, the session will expire before I hit the 'Post' button on this message.)

    V/r,

    ^_^

    Select form elements is an attribute of type.  So, try to get this attribute would fail.  What I would do, is to add a data attribute to all fields to store the type.

  • Defining the new path for the data files for restoring using the VALUE of NEWNAME FOR DATABASE

    Version: 11.2.0.3 Linux

    Today, I had to do a restore RMAN to a new server and I came across the post following RTO on the VALUE of NEWNAME FOR DATABASE

    ALTER database open resetlogs upgraded;         error to throw

    So, I thought to use it to indicate the new location of the data files to restore.

    That's what I did
    ===================

    Restore the control file and catalog items to backup using the command of CATALOGUE START WITH. Then I started the restoration
    $ rman target / cmdfile=restore.txt
    
    Recovery Manager: Release 11.2.0.3.0 - Production on Thu Jul 26 04:40:41 2012
    
    Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
    
    connected to target database: SPIKEY (DBID=2576163333, not open)
    
    RMAN> run
    2>  {
    3>  SET NEWNAME FOR DATABASE TO '/fnup/hwrc/oradata/spikey';
    4>  restore database  ;
    5>  }
    6>
    7>
    8>
    executing command: SET NEWNAME
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of set command at 07/26/2012 04:40:43
    RMAN-06970: NEWNAME '/fnup/hwrc/oradata/spikey' for database must include %f or %U format
    
    Recovery Manager complete.
    Don't know how it worked for Levi without %f or %U. So, I added %f
     $ vi restore.txt
     $ cat restore.txt
    run
     {
     SET NEWNAME FOR DATABASE TO '/fnup/hwrc/oradata/spikey/%f';
     restore database  ;
     }
    
    
     $ rman target / cmdfile=restore.txt
    
    Recovery Manager: Release 11.2.0.3.0 - Production on Thu Jul 26 04:45:45 2012
    
    Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
    
    connected to target database: SPIKEY (DBID=2576163333, not open)
    
    RMAN> run
    2>  {
    3>  SET NEWNAME FOR DATABASE TO '/fnup/hwrc/oradata/spikey/%f';
    4>  restore database  ;
    5>  }
    6>
    7>
    8>
    executing command: SET NEWNAME
    
    Starting restore at 26-JUL-12
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=19 device type=DISK
    
    channel ORA_DISK_1: starting datafile backup set restore
    channel ORA_DISK_1: specifying datafile(s) to restore from backup set
    channel ORA_DISK_1: restoring datafile 00001 to /fnup/hwrc/oradata/spikey/1
    channel ORA_DISK_1: restoring datafile 00002 to /fnup/hwrc/oradata/spikey/2
    channel ORA_DISK_1: restoring datafile 00003 to /fnup/hwrc/oradata/spikey/3
    channel ORA_DISK_1: restoring datafile 00004 to /fnup/hwrc/oradata/spikey/4
    channel ORA_DISK_1: restoring datafile 00005 to /fnup/hwrc/oradata/spikey/5
    channel ORA_DISK_1: restoring datafile 00006 to /fnup/hwrc/oradata/spikey/6
    channel ORA_DISK_1: restoring datafile 00007 to /fnup/hwrc/oradata/spikey/7
    channel ORA_DISK_1: restoring datafile 00008 to /fnup/hwrc/oradata/spikey/8
    channel ORA_DISK_1: restoring datafile 00009 to /fnup/hwrc/oradata/spikey/9
    channel ORA_DISK_1: reading from backup piece /u07/bkpfolder/SPIKEY_full_01nh0028_1_1_20120725.rmbk
    channel ORA_DISK_1: errors found reading piece handle=/u07/bkpfolder/SPIKEY_full_01nh0028_1_1_20120725.rmbk
    channel ORA_DISK_1: failover to piece handle=/u07/dump/bkpfolder/SPIKEY_full_01nh0028_1_1_20120725.rmbk tag=SPIKEY_FULL
    channel ORA_DISK_1: restored backup piece 1
    channel ORA_DISK_1: restore complete, elapsed time: 00:01:56
    Finished restore at 26-JUL-12
    
    Recovery Manager complete.
    As you can see, RMAN restore data files to the desired location. But the data file names ended up as
    1
    2
    3
    .
    .      
    .
    9
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -----------| Holy Cow |-----------------------------


    So I had to rename each file as below
    $ mv 1 /fnup/hwrc/oradata/spikey/system01.dbf
    $ mv 2 /fnup/hwrc/oradata/spikey/sysaux01.dbf
    $ mv 3 /fnup/hwrc/oradata/spikey/undotbs01.dbf
    I would have been better in execution of the order for each data below file
    SET NEWNAME FOR DATAFILE
    Now, I think, there is no advantage in using NEWNAME SET of DATABASE to. Only the disadvantages. I did anything wrong above?

    Martin;

    On the issue of the VALUE of NEWNAME FOR DATABASE, you must specify at least one of the first three of the following substitution variables to avoid collisions of names: %b f % U. see semantic entry for TO 'filename' for a description of the possible substitution variables.

    You use %f

    %b
    
    Specifies the filename without the fully qualified directory path. For example, the datafile name /oradata/prod/financial.dbf is transformed to financial.dbf. This variable enables you to preserve the names of the datafiles while you move them to different directory. During backup, it can be used for the creation of image copies. The variable cannot be used for OMF datafiles or backup sets.
    
    %f
    
    Specifies the absolute file number of the datafile for which the new name is generated. For example, if datafile 2 is duplicated, then %f generates the value 2.
    
    %U
    
    Specifies a system-generated unique filename. The name is in the following format: data-D-%d_id-%I_TS-%N_FNO-%f. The %d variable specifies the database name. For example, a possible name might be data-D-prod_id-22398754_TS-users_FNO-7.
    

    Source - E10643-01

    Backup and recovery reference

    http://docs.Oracle.com/CD/E14072_01/backup.112/e10643/rcmsynta2014.htm

    I see CKPT and I agree on that!

    Best regards

    mseberg

  • Comparing the use of the data store for the use of the disk on the server virtual computer: Match is not

    I'm a bit confused and could use clarification of a person.

    I'm looking to a virtual machine through the vSphere Client and it has an alert telling me that my free space data store is low. 17.55 free GB of 134,75 GB total capacity. I'm running ESX 4.0 for the host and my VM running Server 2008.

    I'm confused because when I connect to the virtual computer and check the use of disk in my computer, it does not reflect what vSphere tells me. This particlular VM is little used and the use of the disk under windows is very very low. About 20 GB.

    Can someone tell me why these numbers are not matching? I have other virtual machines that are in the same situation.

    Thank you

    Blake

    I think that you may be mixing two things up, the vSphere client will only warn about the data store, the VMFS volume, you have created and presented to ESX. You then create a VMDK file for your Virtual Machine to use. If you assign more than 80% of your data store to a VMDK or several VMDK then the customer will report a warning on its use. WARNING 80% 90% critical even if inside each VMDK file you may be using only a couple of GB.

    If you give a little more detail on the virtual machine and the data store, we should be able to get out.

    Hope this helps,

    Dan

  • All the Windows updates compressed into a single file for offline use?

    Hey guys,.

    Often, I have to reinstall from my copy of Windows Vista 32-bit. Whenever I do this I have to go through the process of updating all online again, since before the SP1. Of course, this implies several reboots as he patched the update and takes usually 3 or 4 hours. Is there a way I can pack all of the updates to date in a single file which I can run immediately after a new installation?

    It is available online, or is there a packing method updates on my computer?

    Also I'd rather not do this by creating a "ghost image".

    As for the original question, turns on you can download SP1 and SP2 from the Web site. If I did that, then stored the files on my other HARD drive, I could run them immediately after a new installation. It would take a lot of time in the update process.

    Unfortunately, there are several SP1 and SP2 updated prerequisite that must be installed before either Service Packs can be installed, so I must say no, it would not be a viable solution.

    Very generally, it is not advisable to install a Service Pack for Vista until and unless it comes to the computer through Windows Update.

    Your best bet would be to avoid all situations and/or applications that could lead to having to do a clean install of Windows.

    Speaking of which, you format the HARD drive and do a clean install every time, right? ~ Robear Dyer (PA Bear) ~ MS MVP (that is to say, mail, security, Windows & Update Services) since 2002 ~ WARNING: MS MVPs represent or work for Microsoft

  • Can I create an APP only for offline use?

    without publication on the App Store (DPS, simple editing)?

    Not without an enterprise with Adobe and Apple-level account.

    However, you can use Adobe Content Viewer to share with a limited audience.

    Bob

  • I have a PC and can not install the desktop application of Story Plus for offline use.

    I get this error message "the application cannot be installed because of a certificate problem.  The certificate does not match the certificate of the installed application, does not support upgrades of the application or is not valid.  Please contact the author of the application. »

    I have a looming deadline and need help! What should I do?

    Looks like you already have an existing installation of history.

    Please first uninstall the existing version of Adobe Story from the Control Panel, and then try to install the latest.

  • Downloaded songs won't save for offline when added to Playlist in iOS 9.2

    Since the upgrade to iOS 9.2, I noticed that songs that have been downloaded from your music library to iCloud (i.e. songs is not not in the catalog of Apple) are not downloaded in playlists set to be saved for offline use. All of the songs listed in the catalog of Apple are downloaded very well - it's only these obscure titles that have been downloaded from your library. Download these songs directly works fine, but not when they are part of a selection that is set for offline use.

    Anyone else having this problem?

    See you soon,.

    Chris

    I have exactly the same question... anyone knows how to fix this?

    See you soon

  • Download the security updates for offline

    I don't have internet access in my machine so I have to download in my work and to apply updates in my house. Where can I download updates for windows 7 security and other Microsoft products for offline use. Thanks in advance.

    Anguito

    Microsoft Update Catalog
    http://catalog.update.Microsoft.com/

    Security updates are available on image files CD ISO-9660 starting from Microsoft Download Center
    http://support.Microsoft.com/kb/913086

    ~ Robear Dyer (PA Bear) ~ MS MVP (that is to say, mail, security, Windows & Update Services) since 2002 ~ WARNING: MS MVPs represent or work for Microsoft

  • How will I know if I am being charged for the use of data on the mini2 ipad

    How will I know if I am to be charged or billed for usage on my ipad mini data 2?

    Hello

    You can be charged for the use of data on an ipad, if it has a SIM card

    Cellular data.

    If your home wifi is unlimited you will not be charged more.

    Unless your WiFi has a hat of data ie download limit.

    See you soon

    Brian

  • use mobile hotspot or obtain a sim card data prepaid for iPad

    I have an iPhone 6 more and just paid for an iPad pro and it's my first iPad. I don't know if I can use hotspot on my mobile phone to surf the net on my iPad or to obtain a card sim data prepaid?  Thank you

    First of all, you would be able to create a hotspot from the phone that is supported by your operator. If it is supported, then you would be able to configure it to connect your iPad to. Insofar as you are using a SIM of data prepaid for the iPad, which could be made only if the iPad is a mobile Wi - Fi device. Many are the only Wi - Fi devices and cell phones are not supported. You need to know what type of device you have purchased.

Maybe you are looking for

  • Playlists gone?

    I had playlists in my iTunes library. With iTunes version 12.4, any reference to the word "playlist" seems to have completely disappeared from the user interface. I can create new playlists via file > new. I can right click a song in my library and g

  • Snail-like macbook pro help (report EtreCheck)

    For the last few days my macbook pro mid 2012 OS X Mavericks 10.9.5, acted like a snail.  There is nearly constant beach-ball, several minutes to launch any application, jumping and stalling while watching movies via iTunes (both when you are connect

  • Envoy 5530: How can I change the destination by default ANALYSIS folder

    Cannot find the dialog box change the default destination ANALYSIS of My Documents to My Documents / scan my folder when you use the scan of the screen of the printer.

  • Can I upgrade my 32 GB W510 65GB

    Hello Is it possible to upgrade my 64 GB SSD, I can drag SSD 64. Thank you...

  • Debug Assertion Failed!

    Hey guys, I got this click with the right button on my desk. https://dl.dropboxusercontent.com/u/21656944/Debug%20Assertion.png what do I do to fix this? I reinstalled my visual C++ 2008 and I looked at the other discussions of the 2010s. not really