PDA

View Full Version : Add plugins to a store



Ronaldo
26 Jul 2009, 2:03 PM
Hi all,

Since my registration has ended, (yes, I'll request a new one ;) ) I'd like to ask here if it's possible in future releases to add plugins to a store.
Here's my case:

I want to add a more sophisticated filter in the (json) store, that allows me to send stuff like:


filter: [
{field: "user", operator: "=", value: {"id":2},
{operation: "or"},
{name: "anotherfield", operator: "like", value: "myname" }
]Ideally, I'd like to be able to make nested filters.

However, a store is not a component and thus you can't add any plugins. I now have created a plugin for a grid, and use the grid.store parameter to manipulate the store (onbeforeload), but that means I can't use the same plugin for say a combobox.

I'd also need a 'destroy' event for the store.

I could override/extend the store, but a plugin would be a better way, imho.

Ronaldo

mjlecomte
26 Jul 2009, 3:29 PM
FYI, there's already a few (lengthy) threads discussing plugin empowered stores.

Ronaldo
27 Jul 2009, 2:54 AM
Thanks, I'll do a better search and have a look.