PDA

View Full Version : How do Ext.form.Combo could accepts data begin/end with "<" and/or ">" char ?



soulgen
13 Dec 2010, 11:20 PM
Hi all, i have a combo with json data such as:



{
"success": true,
"total_rows": 144,
"root": [
{"cust_name": "<MICHELE>"},
{"cust_name": "HERONA"},
{"cust_name": "<MATTHEW"},
.....
]
}


Take a look at "cust_name" column. Its value sometime contain "<" and/or ">" char and sometime dont.
The bad news is, that combo only render "HERONA" only, the rest is blank.

So, how do Ext.form.Combo could accepts data begin/end with "<" and/or ">" char ?

soulgen
13 Dec 2010, 11:40 PM
*bump

Condor
14 Dec 2010, 2:21 AM
It does show the <> signs when you select the item, just not in the dropdown.

You can fix that with:

tpl: '<tpl for="."><div class="x-combo-list-item">{myDisplayField:htmlEncode}</div></tpl>'

soulgen
14 Dec 2010, 10:22 PM
Love it!
Thx!