PDA

View Full Version : XTemplate messed up is I insert an xml string



forumuser1080
6 May 2011, 11:23 AM
I am trying to stuff an xml string into an XTemplate and things are getting messed up as it seems that XTemplate is interpreting the xml string rather than just displaying it.



qtipTpl:new Ext.XTemplate(
'<tpl for=".">'
,'<div>{value}</div>'
,'</tpl>'
)

renderStuff: function(val) {
// val is "<hello someAttr="attr">"

// create tooltip
var qtip = this.qtipTpl.apply({
value: val
});

// return markup
return '<div qtip="' + qtip +'">' + val + '</div>';
}


So my tooltip should display <Hello someAttr="attr">

forumuser1080
6 May 2011, 1:40 PM
Using htmlEncode in util did the trick.

I am unsure how to set autoHide: false on the tooltip when creating the quick tip using the qtip attribute in the div tag

Any one have any ideas