View Full Version : update tpl on a combobox after render, anyone does this before? thanks

8 Aug 2011, 3:40 PM
im originally creating and rendering a combobox which is hooked up to a store

on the load event for that store i contruct a XTemplate

now i want to set the contents of the combobox to the XTemplate i constructed in the store's onLoad event function

i cant get the combobox to update its contents and replace them with my XTemplate's object html

any ideas?


9 Aug 2011, 5:31 AM
Be careful with the distinction between an (X)Template and the code it generates. You don't want to replace anything with the abstract template; you want to use the code it generated in a specific instance.

9 Aug 2011, 9:36 AM
set lazyRender : true and lazyInit : true

then on the store onLoad i just

this.comboBox.tpl = xTemplateObj.applyTemplate(records);

that worked for me