在使用中发现以下问题:某个字段中包含&字符,在前台页面通过
var postParam = new Ext.form.TextArea({
fieldLabel : 'POST参数',
id : 'postParam',
name : 'normalModelDetail.postParam',
height : 70,
width : 405,
value : '<s:property value="#normalModelDetail.postParam"/>'
});
展示出来的字段里边的&都变为& 了。
解决方法:在获取字段值时,加上escape="false"
var postParam = new Ext.form.TextArea({
fieldLabel : 'POST参数',
id : 'postParam',
name : 'normalModelDetail.postParam',
height : 70,
width : 405,
value : '<s:property value="#normalModelDetail.postParam" escape="false"/>'
});