I got a custom component in which i set the html with an xtemplate something like this
Ext.apply(me, { html: mainTpl.apply() });
I want to add some textfields to my XTemplate too and i cant figure out how to do this.
new Ext.XTemplate('<div Class="TopHeaderUserInfo"><div id="TopHeaderLanguageDiv" ><div Class="ActiveLanguageFlag" lang="{[ this.getLanguage() ]}" ></div>' +
'<ul Class="LangSelectDropDown HeaderDropDown" style="position:absolute;"><li class="ListHeader">' + MR.locale.SelectLanguage + '</li>{[ this.renderLanguageItems() ]}</ul>' +
'</div>{[this.renderUserInfo()]}</div>',
{
...
...
...
renderUserInfo: function () {
return (MR.classes.CurrentUser.user == null ?
'<div Class="LogInOut" Id="TopHeaderLoginLogoutLink"><a Class="Login">' + MR.locale['Login'] :
'<span>Welcome, ' + MR.classes.CurrentUser.getUser().get('FullName') + '</span> <a Class="Logout">' + MR.locale['Logout']) + '</a>' +
'<ul Class="HeaderDropDown LoginDropDown" style="position:absolute;"><li class="ListHeader">Header</li>' +
// INSERT TEXTFIELD HERE
'</ul>' +
'</div>';
}
})
please help - i dont know how to continue. couldnt find a solution in the web.
If you need any further information, dont hesitate to ask!
Ext.form.field.Text
, right? – Molecular Man<div id="textfield-placeholder"></div>
) and after rendering the xtemplate create textfield and render it inside that placeholder. – Molecular Man... though i dont know how or WHERER/WHEN i render my Textfields to them
Do it whenever and wherever you want but AFTER the xtemplate with placeholder is rendered.... i dont know how ... i render my Textfields
docs.sencha.com/extjs/4.2.0/#!/api/… – Molecular Man