View Full Version : Custom Renderer for List of Strings using XTemplate?

11 Aug 2009, 2:24 AM
If we have a property in MODEL object, which is a list of strings, automatically when used inside XTemplate, it is always rendering the values separated by comma. How can i change this beahavior.
Actually i want to render them in new line instead of comma seperated as that looks better.

Any help greatly appreaciated!

Thank you

11 Aug 2009, 2:41 AM
one idea: subtemplates like "<tpl for=...."

syntax is described here:
http://www.extjs.com/deploy/dev/docs/source/XTemplate.html#cls-Ext.XTemplate (http://www.extjs.com/forum/../deploy/dev/docs/source/XTemplate.html#cls-Ext.XTemplate)
(scroll a little bit down)

11 Aug 2009, 11:11 PM
Thank you so much Arno!!

Any one out there have similar reqiurement, here is syntax:

<tpl for="myListOfStringsProperty"><div>{.}</div></tpl>