How To Run Javascript Function Inside Ext.List itemTpl

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:

itemTpl: '<div>{[ myfunc({values.fieldname}) ]}</div>'

Donations appreciated. Every little $ helps. Or click Google +1. Or play the short video on the upper right of this page.

Related Posts Plugin for WordPress, Blogger...

Post a Comment