Ext JS: Combine 2 services output into a single grid

#26 in this Ext JS FAQ inspired me on how to combine 2 services output into a single grid. The concept was all that I needed. I ended with my own implementation following the same concept. For my practical use, I created 3 stores. The 3rd one held aggregate output from the first 2 stores. This was easier for me to add an extra column that doesn’t exist in the first two. I followed the same concept as the one presented in the response for Q&A #26: register a function that listened on ‘load’ event from the source store. In the function, I first removed old records originated from the same store before adding the new data from the source stores. This was probably un-necessary. I just wanted to makes sure that there wasn’t duplicates. Before I added the new data into the target store for the grid panel, I had updated each record for my needs. I had to use the records array generated from the source store and pass the modified version to the target store instead of creating my own records.

I am happy with the results and thanks to the authors of the FAQ. It helped.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s