extjs框架问题

J2EE 码拜 8年前 (2016-02-02) 1154次浏览
为什么下面代码出现这种结果?
客户编号<a style=””color:red;””>*</a>:
客户名称*:
initUIComponents : function() {
this.formPanel = new Ext.FormPanel({
url : __ctxPath + “/customer/saveCustomer.do”,
layout : “form”,
id : “CustomerForm”,
bodyStyle : “padding:5px;”,
frame : false,
defaults : {
widht : 400,
anchor : “100%,100%”
},
method :””post””,
formId : “CustomerFormId”,
defaultType : “textfield”,
items : [{
name : “customer.customerId”,
id : “customerId”,
xtype : “hidden”,
value : this.customerId == null ? “” : this.customerId
}, {
xtype : “container”,
style : “padding-left:0px;”,
layout : “column”,
height : 26,
items : [{
xtype : “label”,
text : “客户编号<a style=””color:red;””>*</a>:”,
style : “padding-left:0px;padding-top:3px;”,
width : 104
}, {
xtype : “textfield”,
width : 207,
name : “customer.customerNo”,
id : “customerNo”,
allowBlank : false,
blankText : “客户编号不能为空!”,
listeners : {
change : function(c, a, b) {
if (a != null && a != “”
&& a != “undefined”) {
Ext.Ajax.request({
url : __ctxPath
+ “/customer/checkCustomer.do”,
params : {
customerNo : a
},
method : “post”,
success : function(e) {
var d = Ext.util.JSON
.decode(e.responseText);
if (d.pass) {
Ext
.getCmp(“CheckMessage”).body
.update(“”<img src=”””
+ __ctxPath
+ “”/images/flag/customer/passcheck.png” />可用””);
} else {
Ext
.getCmp(“CheckMessage”).body
.update(“”<img src=”””
+ __ctxPath
+ “”/images/flag/customer/invalid.png” />不可用””);
}
},
failure : function() {
}
});
}
}
}
}, {
id : “CheckMessage”,
xtype : “panel”,
width : 2,
style : “padding-top:3px”
}, {
id : “getNoButton”,
xtype : “button”,
text : “系统生成”,
iconCls : “btn-system-setting”,
handler : function() {
Ext.Ajax.request({
url : __ctxPath
+ “/customer/numberCustomer.do”,
success : function(b) {
var a = Ext.util.JSON
.decode(b.responseText);
Ext.getCmp(“customerNo”)
.setValue(a.customerNo);
Ext.getCmp(“CheckMessage”).body
.update(“”);
}
});
}
}]
}, {
fieldLabel : “”客户名称<a style=”color:red;”>*</a>””,
name : “customer.customerName”,
id : “customerName”,
allowBlank : false,
blankText : “客户名称不能为空!”
}
解决方案:20分
{
text:””客户编号<a style=”color:red;”>*</a>””, width : 160, dataIndex:””riskId””
}
ext 建议用单引号不要用双引号,是不是可以给分了

CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明extjs框架问题
喜欢 (0)
[1034331897@qq.com]
分享 (0)