Extjs formPanel表单提交问题
<%@pagelanguage="java"import="java.util.*"pageEncoding="UTF-8"%><!DOCTYPEHTMLPUBLIC"-...
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'simpleFormPanel.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<link rel="stylesheet" type="text/css" href="resources/css/ext-all.css" />
<script type="text/javascript" src="adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="ext-all.js"></script>
</head>
Ext.onReady(function(){
Ext.QuickTips.init();
var body = Ext.getBody();
Ext.form.TextField.prototype.msgTarget = 'side';
var form1 = new Ext.FormPanel({
id:'formPanel',
labelWidth: 70,
title:'simple form',
bodyStyle:'padding:5px 5px 0',
width: 350,
frame:true,
defaults:{width:230},
url:'http://localhost:8080/extStudy/GetExtFormPanelData',
listeners:{
"actioncomplete":function(_form,_action){
alert("dfas");
}
},
items:[{
xtype:'textfield',
fieldLabel: 'First Name',
name: 'firstName',
allowBlank:false,
blankText:'姓名不能为空',
emptyText:'请输入姓名'
}],
waitMsgTarget: true,
buttons:[{
text:'确定',
handler:function(){
Ext.getCmp("formPanel").getForm().submit({
waitTitle:'wait',
waitMsg:'wait...',
success: function(form, action) {
Ext.Msg.alert('Success', "chen");
} });} }] });
form1.render(body);
});
上边的内容只是想servlet提交一个用户名,但是单submit的时候程序一直处于等待状态,后台什么也没有写只是一个空的servlet(继承了HttpServlet),请问这个是怎么回事 高分一定加到位 请解释清楚 展开
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'simpleFormPanel.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<link rel="stylesheet" type="text/css" href="resources/css/ext-all.css" />
<script type="text/javascript" src="adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="ext-all.js"></script>
</head>
Ext.onReady(function(){
Ext.QuickTips.init();
var body = Ext.getBody();
Ext.form.TextField.prototype.msgTarget = 'side';
var form1 = new Ext.FormPanel({
id:'formPanel',
labelWidth: 70,
title:'simple form',
bodyStyle:'padding:5px 5px 0',
width: 350,
frame:true,
defaults:{width:230},
url:'http://localhost:8080/extStudy/GetExtFormPanelData',
listeners:{
"actioncomplete":function(_form,_action){
alert("dfas");
}
},
items:[{
xtype:'textfield',
fieldLabel: 'First Name',
name: 'firstName',
allowBlank:false,
blankText:'姓名不能为空',
emptyText:'请输入姓名'
}],
waitMsgTarget: true,
buttons:[{
text:'确定',
handler:function(){
Ext.getCmp("formPanel").getForm().submit({
waitTitle:'wait',
waitMsg:'wait...',
success: function(form, action) {
Ext.Msg.alert('Success', "chen");
} });} }] });
form1.render(body);
});
上边的内容只是想servlet提交一个用户名,但是单submit的时候程序一直处于等待状态,后台什么也没有写只是一个空的servlet(继承了HttpServlet),请问这个是怎么回事 高分一定加到位 请解释清楚 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询