2 Replies Latest reply on Oct 16, 2007 9:03 PM by hohohuhu

    Remote object call for each item in datagrid


      I want to display large number of items in DataGrid (> 30,000). Each items could take some time to retrieve all information for displaying. So I want to do lazy call to server only when particular row is in view. I'm currently using RemoteObject to communicate with server side with single result event handler to get information of each row. Here is the code snippet :


      pubic class MyService {

      private var ro:RemoteObject;

      public function init() {
      ro = new RemoteObject("myDestination")
      ro.addEventListener('getItem').addEventListener(ResultEvent.RESULT, resultHandler);

      private function resultHandler(event:ResultEvent) {
      // get object from event.result


      In my understanding, the call to remote object is asynchronous so it can't wait until result is returned to proceed the next row. That means I need to have this instance of my class for EACH row in DataGrid ? Is there any better way to this. I worry about memory footprint of my application if I do so.
        • 1. Re: Remote object call for each item in datagrid
          FDS 2.5.1 now supports custom paging via HibernateAssembler. Have a look in the new FDS user doc section "Using on-demand paging". However, the doc is not clear that if "cache-item" could still be used thgether with "custom paging". If you are already using HibernateAssember and DataGrid, looks like you should get this FDS-DB server paging behavior by just enabling this feature. I will be using this feature in a week or so. Hope this helps.

          • 2. Re: Remote object call for each item in datagrid
            hohohuhu Level 1
            Thank you, Chang. The thing is I'm not using Hibernate or any JDBC. My data is actually come from mailbox. I'm developing an application that read bunch of mails from mailboxes and display in data grid.