javascript - Combine remote filter and local filter -
Now, I have a store that contains This On the other hand, the rules can become active or passive, and the indicator is always transmitted to the customer. Now I want to add a checkbox "Show only active rules", which filters the rules of Is it possible, and how? Whenever I add filters to the store, the store thinks it's a remote filter, and ask the server what to do ... You can use Example remoteFilter: true and
(Code) 'from', property: 'to', value: ext.getCmp ("ruleFrom"). GetValue ()}
Ext.getStore ("AccessRuleStore") AddFilter ([new Ext.util.Filter ({id: 'from'), New Ext.util.Filter ({id: 'to', Properties: 'From', Value: Extension .getcmp ("ruleTo"). GetValue ()})));
addFilter automatically activates a call on the server, where
to and
to Is used to calculate which is the rule of sending the client, because only the server knows that
to and
to values match what rule (for some reason , The value from
to the and
to values can not be reported to the client).
(rule.get ("active") === true) on the client side.
store.filterBy which only local filters.
rulesStore.filterBy (function (rule) {Return rule.get ('active');});
Comments
Post a Comment