Update DataGrid over ArrayCollection

Hey,
I have got a problem with the updating capabiliy of the
ArrayCollection.
I fill the array like this.
quote:
[Bindable]
private var content:ArrayCollection = new ArrayCollection();
private function contentRPCResult(event:ResultEvent):void {
content = event.result.allEntries.entry;
The data I like to fill the ArrayCollection with, is
information I got from a mysql database over PHP. It needs to be
reloaded from time to time, because the content changes quiet
frequently. So I used a "Refresh" button. While clicking on it the
RPC "contentRPC.send();" gets sent again. The command works fine,
because the first time the database content loads into the app.
If I click on the refresh button, nothing happens. I thought,
if the content of an ArrayCollection changes, the content of its
dataprovider changes as well?! I used an XMLListCOllection in
another app, there it works. If I send the HTTPRquest again, the
content changes if there were any changes since the last load.
I even tried removeAll() or refresh() to empty the Array and
fill it again with the new data. It doesn't work. Only the first
loaded content is displayed in the data provider. If i reload the
whole app, the content shows the actuall content (which is the
first loaded content, indeed!).
So my question is: I fill an ArrayCollection with
"contentRPC.send();" (HTTPRequest) once. The dataprovider shows the
content. When I user "contentRPC.send()" again and the new content
is different to the old one, how could I refill the ArrayCollection
with the new content (it should automatically change the content of
the dataprovider)?
Hopefully you understand my problem. I am actually German, so
it was hard for me to explain, what I really intend to do!
Thanks for any help.
greets lindner

Hey Vygo,
thank you for your answer. Unfurtunatly it is not a cache
problem. I tried the unique thing, which sounds very meaningful.
But the ArrayCollection still gets not refreshed, or reloaded. When
I use the PHP Script on its own, it always shows the current
content, using no cache at all. So I know the right content gets
passed to the flex app, but the app does not use it!
Any other suggestions, maybe there is a cache problem in
flex?
I just took a look in the older app where I used an
XMLListCollection to fill the dataprovider.
There the command to gill the XMLListCollection was
"HTTPRequest_ID.
lastResult.XML_node". Now I fill the ArrayCollection only
with "content = event.
result.allEntries.entry;". I can not use lastResult at this
point. Might this be a problem? I an't believe there is no way to
fill an ArrayCollection at runtime more than one time?!
greetings lindner

Similar Messages

  • Trying to update iPhone firmware and it's making me download update all over again!

    Hi all,
    Alright so I am trying to update the firmware on my iPhone 4 which currently has iOS 5.0.1. I plugged it in, opened iTunes, and clicked update. I went through the agree/disagree  and the "backup/don't backup" popups Then, iTunes started to download the firmware update. After two hours of download time, it finally finishes. I unplugged my iPhone to make a call, then plugged it backin to go ahead and install the update. I go to my iphone on the left hand column of iTunes, click update, go through all the same popup windows and then iTunes stars to download the entire update all over again!!! I even checked the library directory where iTunes downloads the firmware/restore files (.ipsw files) to, and notice that the original update file is still there (iPhone3,1_5.1.1_9B206_Restore.ipsw), and it is downloading the exact same file all over again. Why is it doing this? I don't want to have to wait another two hours!
    Thanks for any help,
    James

    Try shift-clicking (windows) or option-clicking (mac) on the Check for Update button in iTunes and when prompted navigate to the .ipsw file.

  • Can't update 5300 over the air

    when try to update 5300 over the air i get a no network connection error but i have gprs activated and also over the air support is available in my country

    I don't know about the connection error, But i don't recommend you do it over the air, It'd costa fortune over gprs to update it.
    Nokia N95
    V 20.0.015
    0546553

  • Stuck in Verifying update for over 30 minutes.

    Did the system update and now it is stuck in the verifying update for over 30 minutes. Have done updates before and this has never happened.
    What to do next. This is the only form of communication that I have in my home.

    Idc41864
    We want the software update to be a success.  I'm sorry that hasn't been the case for you.  Let's get some details from you.  What is the make and model of your phone?  Have you attempted to power your phone off and then on?  Let us know so we can continue to assist further.
    EmmaM_VZW
    Follow us on Twitter @VZWSupport
    If my response answered your question please click the �Correct Answer� button under my response. This ensures others can benefit from our conversation. Thanks in advance for your help with this!!

  • How can I update my Iphone when the update is over 20mb, can this be done in Itune ?

    How can I update an app if the update is over 20 mb. Can this update be done in Itune ?
    An update on Iphone is not possible when it is over 20 mb. and I can't find an update tool in Itune.
    Thanks

    Yes for itunes, or you can update when you on wifi.
    On the left side bar where you see apps click on it then on the bottom you will see check for updates.

  • HT1338 my macbook air has not done a software update for over a year..

    Please can some help and tell me how to perform software updates and switch on the auto update as i cannot believe there has been no software update for over a year!! .i have tried doing it manually via the software update section of the apple menu but it keeps telling me there is no update
    many thanks

    If you're running Mac OS X 10.5.8, you need to buy a Mac OS X 10.6 DVD from the online Apple Store to upgrade further.
    If you're running Mac OS X 10.6.8, you need to buy Mac OS X 10.8 from the Mac App Store, or if 10.8's incompatible with your Mac, phone the online Apple Store and order a download code for 10.7.
    (80356)

  • Strange Behaviour on DataGrid with ArrayCollection as DataProvider

    I have a Datagrid with an ArrayCollection as DataProvider, the arrayCollection is partially generated by a remoteObject call, the dataprovider seems to works at least until I try to edit the field...
    By the RemoteObject I only receive an ArrayCollection with the field `ip`, but the datagrid looks for the fields ip, check and save...
    If I add/edit this new field it works, but only under particular condition
    The DataGrid:
    <s:DataGrid id="datagrid" left="10" right="10" top="136"
           dataProvider="{listaIPCheck}" bottom="10" requestedRowCount="4">
              <s:columns>
                    <s:ArrayList>
                         <s:GridColumn dataField="ip" headerText="Asset"/>
                         <s:GridColumn dataField="check" headerText="Inventory"/>
                         <s:GridColumn dataField="save" headerText="Salvataggio"/>
                    </s:ArrayList>
               </s:columns>
    </s:DataGrid>
    The Script:
       [Bindable]private var listaIPCheck:ArrayCollection;
        private function ro_resultHandler(event:Event=null):void
          listaIPCheck = new ArrayCollection();
          listaIPCheck = ro.getListUpdate.lastResult;
          heap = 0;
          // Read Below {POINT #1}
          init3();
        private function init3():void
         // Read Below {POINT #2}
         if (heap<listaIPCheck.length)
            // omitted the initialization of the process p
            p.addEventListener(NativeProcessExitEvent.EXIT, onExit);
            try{
              p.start(startupInfo);
            }catch(e:Error){}
        private function onExit(e:NativeProcessExitEvent):void {
            // Read below {POINT #3}
    Here is my code, now as you can see there are 3 line where I wrote to read below...
    Let's assume to put this simple `for` instead of the commented line (once at a time)
        for (var k:Number=0;k<listaIPCheck.length;k++)
          listaIPCheck.getItemAt(k).check = "checkVal";
          listaIPCheck.getItemAt(k).save = "saveVal";
    This code always work in the 3 points, so at the end of the call the ArrayCollection is always filled with the new values, but the datagrid refresh the items only in POINT #1 and POINT #2
    Why not in Point #3???

    Thank you Amy, but adding the properties in the server side did not work...
    The workflow of the program is that:
    1) I get the ArrayCollection (listaIPCheck) contatining some information  (function ro_resultHandler)
    2) I start an external process and grab the output data (function init3)
    3) read and use the data from the process (function onExit)
    Now the problem I have is regarding the refresh of the datagrid, this datagrid has the ArrayCollection (listaIPCheck) as DataProvider.
    So:
    - If I put the for loop instead of the comments  ( // Read Below {POINT #1} ) or
    ( // Read Below {POINT #2} )  it works, the ArrayCollection is updated and the datagrid is refreshed
    - Whereas if I put the for loop instead of  ( // Read Below {POINT #3} ) , it won't work.. or at least, the ArrayCollection is correctly updated, but the datagrid is not refreshed at all and I have to use .refresh()

  • Looping over arraycollection with sap data

    Hello,
    I asked a lot of persons but i still have a problem.
    I am trying to make a organizational chart in Adobe Flex with data out of the SAP system.
    When I try to access my data that I have given trough the Flash Islands container it doesn’t work.
    I do:
    [Bindable]
    Public var datasource:Arraycollection;
    Then I want to loop over this datasource with a for loop but it says that the object is null.
    for (i = o; i < datasource.length; i++)
    When I use datasource as dataprovider for a datagrid in Flex, that works perfect.
    Please answer fast because I need it for school.
    greetings

    Hello,
    I asked a lot of persons but i still have a problem.
    I am trying to make a organizational chart in Adobe Flex with data out of the SAP system.
    When I try to access my data that I have given trough the Flash Islands container it doesn’t work.
    I do:
    [Bindable]
    Public var datasource:Arraycollection;
    Then I want to loop over this datasource with a for loop but it says that the object is null.
    for (i = o; i < datasource.length; i++)
    When I use datasource as dataprovider for a datagrid in Flex, that works perfect.
    Please answer fast because I need it for school.
    greetings

  • Update DataGrid using RemoteObject

    I am using a RemoteObject method call to populate an ArrayCollection used as a dataProvider in my DataGrid. I use the render() method on the datagrid to make sure the datagrid displays the updated data the RemoteObject method is returning everytime it is displayed. My problem is the datagrid displays the updated information but gets into an infinite call.
    What might be the appropriate way to get the updated data from the backend?
    -Thanks,
    Fauzia

    Hi Michael,
    Thanks for your reply. The AC I use is bindable, but it doesn't get update with an initialize() method, thats why I had to use render(). This is an outline of my code...
      <mx:RemoteObject id="historyService" result="onResultGetList(event)" showBusyCursor="true" fault="onFault(event)" destination="historyService">
         <mx:method name="getLrcFindDetailCltn" result="onResultGetList(event)" makeObjectsBindable="true" fault="onFault(event)"/>
       </mx:RemoteObject>
           [Bindable]
            private var ldsDetails:ArrayCollection;
              public function getList():void
                historyService.getLrcFindDetailCltn();
              public function onResultGetList(event:ResultEvent):void
                 ldsDetails = event.result as ArrayCollection;
    <mx:DataGrid id="usersDataGrid" dataProvider="{ldsDetails}" render="getList();">
    <mx:columns>......
    Thanks,
    Fauzia

  • Update datagrid

    Hi,
         In my project i had included number of components.In one component i need to update data from a table and have to display in the same page after clicking the update button.I cannot refresh refresh the datagrid. so i just called the datagrid creation complete handler but showing one error like
    "cannot access property or method of null object reference"
    whats the solution??
    Thanks in advance.
    sreejaVirtus

    i had used data services
    i cant send full code...so i m sending the needed part.
    protected  function dataGrid_creationCompleteHandler():void
    getAllFlex_classroomResult.token = flexclassroomService.getAllFlex_classroom();
    protected 
    function btn_update_clickHandler(event:MouseEvent):void{
    var item:Flex_classroom=new Flex_classroom();item.id=dataGrid.selectedItem.id;
    item.classroom=txt_classroom.text;
    if(rb_private.selected==true){
    item.type=
    "Private";}
    if(rb_public.selected==true){
    item.type=
    "Public";}
    updateFlex_classroomResult.token = flexclassroomService.updateFlex_classroom(item);
    if(updateFlex_classroomResult.token){
    Alert.show(
    "Classroom has been updated successfully!");dataGrid.dataProvider=getAllFlex_classroomResult.lastResult;
    while clicking on the button it need to a message and list the updated data in the same page.
    thanks in advance.

  • Undefined error: when update datagrid in flex

    I get this error when trying to update a field in my datagrid, using LCDS 2.61 with coldfusion.
    Why?
    undefined
        at mx.data::CommitResponder/result()[C:\depot\flex\branches\enterprise_bridgeman_final_hotfi xes\frameworks\mx\data\CommitResponder.as:424]
        at mx.rpc::AsyncRequest/acknowledge()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\ AsyncRequest.as:74]
        at NetConnectionMessageResponder/resultHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\ src\mx\messaging\channels\NetConnectionChannel.as:515]
        at mx.messaging::MessageResponder/result()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx \messaging\MessageResponder.as:199]
    Thanks,
    Jon Kravetz

    To troubleshoot this, you should add <mx:TraceTarget /> to your mxml file and then debug your application.  Afterwards, reply with the trace log from the console...

  • Update Datagrid without refreshing

    Hi everyone!
    Is there a way to refresh a datagrid without clicking a button or refreshing the page if a new entry was inserted into the database.
    Example:
    A new name is inserted in the database, my datagrid will automatically update, it's like real time in updating.
    thank you very much!

    re-Flexing wrote:
    Hi everyone!
    Is there a way to refresh a datagrid without clicking a button or refreshing the page if a new entry was inserted into the database.
    Example:
    A new name is inserted in the database, my datagrid will automatically update, it's like real time in updating.
    thank you very much!
    what kind of project are you going to be including it in?
    commerical? personal?
    or are you just messing around with code?
    messing around/personal usage, i'd suggest a script acting on a timer request to check the database for any new entries.
    with a fully commerical project, you'd have to go the route of developing your own system with the implementation of a send/listener procedure, or as already mentioned, buy a pre-built one.

  • My podcast has not updated in over two months. Ive tried everything to get it working. Please Help

    My feed has not updated in the store for over two months. I now have three new episodes in there which are not showing up.
    Everything works fine through itunes, i can see all episodes and my feed validates with the feed validator.
    About 2 months ago my artwork dissappeared from the feed and since then it has never updated again.
    Hope someone can help.
    Store Address: http://itunes.apple.com/gb/podcast/beyond-silence/id513494851
    Feed Address: http://www.hiddenagenda.dj/podcast/BeyondSilenceRSS.xml

    Hi Roger, just to update you on the situation.
    I did some more digging into the problem im having and it was suggested that i tried re-submitting the feed to the store.
    On doing so i got the error message that my hosting does not have byte-range support which it seems a lot of people are having problems with. Having read further it seems apple introduced these changes around the time my podcast stopped updating which seems to tie into how the issue started.
    So i created a test feed with one episode and a link to a media file from a working podcast and still it would not submit, i was getting the 'We have difficulty reading this feed. Connection Reset error'
    Luckily i have another hosting provider so i uploaded the exact same test feed and the feed got accepted.
    So i have come to the conclusion that my host does not have byte-range support but also it seems this is stopping it reading the actual .xml file as well as the .mp3 content which from reading other posts should not happen.
    So im in the process of uploading the latest episode to my host that has byte-range support enabled and im going to update my current feed with one episode and a link to the .mp3 file on the server with byte-range support enabled and im hoping fingers crossed the feed updates.
    Obviously i can set up a new feed on the server with byte-range support enabled but if my current feed fails to update at all im concerned i will never be able to update the feed again and therefore never be able to add the feed URL redirect code in order to keep my subscribers.
    Thought id share this with you as it may help you in helping others having similar problems.
    Richard Pitts

  • It seems there is no any updatable datagrid in jsp

    HI
    I am looking for an updatable,editable datagrid for my webapp?anyone knows one? even using struts,...
    Thank u

    JSF will handle most of the donkey work for you with its DataTable component

  • Update Checking Over the Air..N80

    hi all,
    this is my very first post. i'm a N80 user, and i just flashed my firmware into v 4.0623.0.42 recently.
    i did it via NSU and i worked just fine.
    But i have 1 simple question, everybody's talking about checking updates over the air via 'Device Manager'. I tried to do that (just in case new update's available), but when i opened my 'Device Manager', 'no server profile' is written on the screen.
    What should i do about this? The server profile is supposed to be created automatically or should i create it my self? if i should, i don't have any idea how to fill in the blanks..
    any advise is kindly appreciated..
    Nokia 6600 - Nokia 3250 - Nokia N80

    thx 4 the reply dezi,
    im afraid that is not what i meant. I've checked and the v 4.0623.0.42 fw is the newest one for my N80. and i just successfully flashed it recently (maybe a week ago).
    what i really wanna know is just how to check updates via 'device manager', the settings, server profile(how to create one), etc.
    thx,
    moelest
    Nokia 6600 - Nokia 3250 - Nokia N80

Maybe you are looking for