I bet you used the filter() function to do it, right?

This function only works if you specify one field or an array of fields to use in filtering out results based on 1 search text. If there is more than 1 value to consider in filtering entries in the store, you will have to use the filterBy() function for custom and complex scenarios.

Check out this sample code.

The code filters entries in the store where a model’s field name labeled fieldname1 and fieldname2 has a substring of searchkey1 and searchkey2 respectively. That is how you should do it.

This won’t work.

So my itemTpl contained HTML code with some EX Javascript inside Ext.List to dynamically output values based on a store’s model.

While it is easy to output those fields by using { fieldname }, I got stuck for a bit when I wanted to run a Javascript function within it using the field output as the parameter.

The solution to this is to enclose your Javascript function with {[ and ]}.

Check the sample below:

This one is easy. The same way you set an icon to the Ext.tab.Panel component, you also call the iconCls attribute in Ext.Button.

However, in order to apply the icon there, you need to call another attribute iconMask and set it to true.

That should make the icon appear in your button component.

Related Posts Plugin for WordPress, Blogger...