Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Datagrid ArrayCollection Timeout issue

Avatar

Level 1

Has anyone else encountered this? I'm trying to populate a datagrid with a large amount of data (approx. 1800+ records). Using a ColdFusion backend, the RemoteObject executes the CFC to generate the SELECT statement, which takes approx. 20 seconds to finish execution.

After this, the ResultEvent is returned and bound to an ArrayCollection. However, I get a #1502 error because the script takes longer than 60 seconds to execute.

Rather than extending the script timeout (if possible), is there any way to populate (bind) the arraycollection to the datagrid in segments?

2 Replies

Avatar

Level 1

That is my best bet if the solution I am looking for isn't possible. Hopefully I will be able to pass the sort columns back to the query for sorting...

Currently I'm using a pagableArrayCollection. The RO calls the CFC, which executes the query. In the result event, the event.result is bound to a "holding" ArrayCollection, then a pagablearraycollection is created from the "holding" source.

private function getData_result(event:ResultEvent):void {

     acHold = event.result as ArrayCollection;

     acData = new PagableArrayCollection(acHold.source);

}

The dataprovider is acData.

What I want to do is bind in segments, breaking the script segment into chunks so that it will not timeout. Now I'm wondering, is it timing out on binding acHold, acData, or displaying the datagrid.

As is, the app attempts to load all of the data at once, but only 100 records are "displayed" in the datagrid, even though all of the data is actually bound.