Ext.onReady(function() {
Ext.QuickTips.init();
// 输入验证框不通过是时,消息提示方式有四种:qtip,title,under,side
Ext.form.Field.prototype.msgTarget = 'under';
var requiredMark = '<span style="color:red">*</span>';
var isPersonNameOK = true; // 先定义个全局变量
var IsExsit = false;// 此变量一定要在方法外面定义
function ReturnValue(ok) {// 此方法必须放CheckUserName里面。
IsExsit = ok;
}
function checkName() { // 检查用户名是否存在
var username = Ext.get('parts.partsname').dom.value;
Ext.Ajax.request({
url : 'CheckPartsAction',
params : {
name : username
},
success : function(response, options) {
var data = Ext.util.JSON.decode(response.responseText);
if (data.success == true) {
ReturnValue(true);
} else {
ReturnValue(false);// 不能在success里面直接return
}
}
});
return IsExsit;
}
var simple = new Ext.FormPanel({
frame : true,
layout : "form",
title : "添加配件信息",
// monitorValid : true,
labelWidth : 70,
renderTo : "form",
xtype : 'fieldset',
collapsible : true,
labelAlign : 'right',
method : 'post',
autoHeight : true,
width : 330,
defaultType : 'textfield',
defaults : {
width : 200
},
items : [{
xtype : "textfield",
fieldLabel : requiredMark+ '配件名称编码',
name : 'parts.partsnameid',
allowBlank : false
}, {
xtype : "textfield",
fieldLabel : requiredMark + '配件名称',
name : 'parts.partsname',
allowBlank : false,
//validator : CheckName,
validatorEvent : 'blur',
invalidText : "配件名称已经存在",
emptyText : "请输入配件名称",
validator : function(thisText) {
if (thisText != '') {
Ext.Ajax.request({
url : 'CheckPartsAction.action',
method : 'post',
params : {
name : thisText
},
success : function(response,
详细解决方案
EXt向astruts2 action导入数据,有完整代码,该如何处理
热度:306 发布时间:2013-04-26 16:27:53.0
相关解决方案
- ssh action 调用service的时分service 为null
- Struts-config.xml配置文件《action-地图pings》元素的详解
- 关于<form action >的一个有关问题
- form 表单交付 <form action="<c:url value='desktop'/>"
- 上面是JAVA WEB中,学生在线考试(action)的代码,有几个不明白,帮忙解释一上
- struts2 action 实施大概超过一分钟后 不执行跳转了
- struts2 下传一段时间后报错No result defined for action and result input重启后便没有有关问题了
- description The requested resource (/gongqiu/goindex.action) is not available.解决方法
- function 施行 *action
- struts action 提交有关问题
- No result defined for action com.tes.web.action.FirstAction and result success,该怎么处理
- SSH框架中获取Action.action?submit=toList的类似完整路径解决思路
- <s:action>标签上传参数到action,该怎么解决
- struts2 action 执行时间过长 不执行跳转了,该怎么处理
- struts.xml里 <action name="">的有关问题,求指点迷惑
- <s:a href="aa.action!parentid=9"/> 是这么传参的吗
- 急在Struts2 action 中得到数据后,为某个字段截取字符串,怎么将该字段作为参数传到后台呢
- Struts2 的 Action 类里如何创建 session request response out 对象
- No result defined for action com.score.student.action.StudentAction and result i,该如何处理
- No result defined for action XXX and result input求解,该怎么解决
- struts action 返回字符串有关问题
- struts action 跳转 页面后 frameset 404 异常
- websphere5.12 Error 503: Failed to load target servlet [action],该如何处理
- postbackurl 和 <form action="">中的action有什么区别解决方法
- import org.apache.stryts.action.Action
- 如何区分Struts Action Element?(已解决)
- 无法找到Servlet action
- action 返回提示
- Myeclipse8.5建struts2文件上传,出现no result for action com.UploadActi ...
- structs *.do* .action 联系、联系