I thought I had figured this out... then Ext JS called to remind me that I had been out of my handcuffs too long.
I need to paginate search results and flip through the records that matched my search, e.g. a list of all pages by a certain author. The first search works fine: I get a list of records matching my search. But when I click the "next page" link, I lose my filter field: the author dropdown resets to null, so I once again get *all* results instead of page 2 of my subset.
It's a chicken-and-egg scenario: from what I understand, I need to pass the field values when I define the data store, but the fields reference the store in their definition. So there's no clear-cut way for one to reference other. There are no clear-cut examples in the MODX manager because of the whacko customizations of an already poorly-documented JS framework. It feels less like doing development and more like I'm doing my taxes...
This thread is as close as I've found:
http://www.sencha.com/forum/showthread.php?82135-Get-form-field-by-name
Here's the overview of what I'm doing in my CMP:
1. Define my data store
2. Define and render the grid panel with a pagination toolbar using the store
3. Define the form panel with my filter fields (e.g. author)
I'm seriously losing my mind with this stuff... the Ext JS "docs" contain practically no real-world examples (e.g. the paging examples never feature search filters
http://dev.sencha.com/deploy/ext-4.0.1/examples/grid/paging.html). Even if the devs knew the difference between API docstrings and real documentation, the framework itself is nearly impossible to document because there are a million ways to do any single task.
Anyone got a clear example of how this is supposed to work?