- 浏览: 241559 次
- 性别:
- 来自: 上海
文章分类
最新评论
-
无它唯勤:
...
Spring Ioc AOP -
dubaopeng:
挺好的,拿去改改!
java 解析csv文件 -
灵程大哥:
先试一下,看行不行
java 判断文本文件编码 -
pxjianke:
谢谢兄弟。我现在在测试插入千万级数据。做测试。这个太有用了。
Oracle 高速批量速插入数据 解决方案
function form1() {
Ext.BLANK_IMAGE_URL = "/learn/ext/resources/images/default/s.gif";
Ext.QuickTips.init();
Ext.form.Field.prototype.msgTarget = "side";
var form = new Ext.form.FormPanel({
title : "用户登陆",
labelWidth : 60,
labelSeparator : ": ",
bodyStyle : "padding:15 5 5 5",
height : 120,
width : 250,
frame : true,
labelWidth : 60,
labelAlign : "right",
applyTo : "form",
items : [new Ext.form.TextField({
fieldLabel : "用户名",
id : "userName",
minLength : 6,
minLengthText : "长度不能小于6个字符",
maxLength : 20,
maxLengthText : "长度超过了20个字符",
selectOnFocus : true,
allowBlank : false,
blankText : "请填写用户名",
regex : /^([\w]+)(.[\w]+)*@([\w-]+\.){1,5}([A-Za-z]){2,4}$/,
regexText : "用户名格式错误"
}), new Ext.form.TextField({
inputType : "password",
fieldLabel : "密码",
allowBlank : false,
blankText : "请填写密码",
minLength : 6,
minLengthText : "长度不能小于6个字符",
maxLength : 20,
maxLengthText : "长度超过了20个字符"
})]
})
}
function form2() {
Ext.BLANK_IMAGE_URL = "/learn/ext/resources/images/default/s.gif";
Ext.QuickTips.init();
Ext.form.Field.prototype.msgTarget = "side";
var form = new Ext.form.FormPanel({
title : "多行文本",
labelWidth : 60,
labelSeparator : ": ",
bodyStyle : "padding:15 5 5 5",
height : 250,
width : 250,
frame : true,
labelWidth : 60,
labelAlign : "right",
applyTo : "form",
items : [new Ext.form.TextArea({
fieldLabel : "备注",
id : "memo",
width : 150
}), new Ext.form.Radio({
name : "sex",
fieldLabel : "性别",
boxLabel : "男"
}), new Ext.form.Radio({
name : "sex",
fieldLabel : "性别",
boxLabel : "女"
}), new Ext.form.Checkbox({
name : "walk",
fieldLabel : "爱好",
boxLabel : "散步"
})],
buttons : [{
text : "确定",
handler : showValue
}]
})
function showValue() {
var memo = form.findById("memo");
alert(memo.getValue());
}
}
function triggerField() {
var form = new Ext.form.FormPanel({
title : "练习Trigger",
labelSeparator : ": ",
labelWidth : 80,
bodyStyle : "padding:5 5 5 5",
frame : true,
height : 100,
width : 270,
applyTo : "form",
items : [new Ext.form.TriggerField({
id : "memo",
fieldLabel : "触发字段",
hideTrigger : false,
onTriggerClick : function(e) {
var memo = form.findById("memo");
alert(memo.getValue());
}
})]
})
}
function form4() {
var store = new Ext.data.SimpleStore({
fields : ["province", "post"],
data : [["南充", "0"], ["成都", "1"], ["广元", "2"], ["乐山", "3"]]
});
var form = new Ext.form.FormPanel({
title : "练习Trigger",
labelSeparator : ": ",
labelWidth : 80,
bodyStyle : "padding:5 5 5 5",
frame : true,
height : 100,
width : 270,
applyTo : "form",
items : [new Ext.form.ComboBox({
id : "post",
fieldLabel : "四川的城市",
triggerAction : "all",
store : store,
displayField : "province",
valueField : "post",
mode : "local",
forceSelection : true,
resization : true,
typeAhead : true,
value : "3",
handleHeight : 100
})]
})
}
function form5() {
var store = new Ext.data.SimpleStore({
proxy : new Ext.data.HttpProxy({
url : "/learn/index.jsp"
}),
fields : ["bookName"]
});
var form = new Ext.form.FormPanel({
title : "远程数据",
labelSeparator : ": ",
labelWidth : 80,
bodyStyle : "padding:5 5 5 5",
frame : true,
height : 100,
width : 270,
applyTo : "form",
items : [new Ext.form.ComboBox({
id : "book",
allQuery : "allbook",
loadingText : "正在加载数据",
minChars : 3,
queyDelay : 300,
queryParam : "searchbook",
fieldLabel : "书籍列表",
triggerAction : "all",
store : store,
displayField : "bookName",
mode : "remote"
})]
})
}
function form6() {
Ext.apply(Ext.form.VTypes, {
dateRange : function(val, field) {
if (field.dateRange) {
var beginId = field.dateRange.begin;
/** 根据组件id得到组件 */
this.beginField = Ext.getCmp(beginId);
var endId = field.dateRange.end;
this.endField = Ext.getCmp(endId);
var beginDate = this.beginField.getValue();
var endDate = this.endField.getValue();
}
if (beginDate <= endDate) {
return true;
} else {
return false;
}
},
dateRangeText : "开始日期不能大于结束日期"
});
Ext.QuickTips.init();
Ext.form.Field.prototype.msgTarget = "side";
var dateForm = new Ext.form.FormPanel({
title : "自定义form",
labelSeparator : ":",
labelWidth : 80,
bodyStyle : "padding:5 5 5 5",
frame : true,
height : 130,
width : 300,
applyTo : "form",
items : [new Ext.form.DateField({
id : "beginDate",
format : "Y年m月d日",
width : 150,
allowBlank : false,
readOnly : true,
value : new Date(),
fieldLabel : "开始日期",
dateRange : {
begin : "beginDate",
end : "endDate"
},
vtype : "dateRange"
}), new Ext.form.DateField({
id : "endDate",
format : "Y年m月d日",
width : 150,
allowBlank : false,
readOnly : true,
value : new Date(),
fieldLabel : "开始日期",
dateRange : {
begin : "beginDate",
end : "endDate"
},
vtype : "dateRange"
})],
buttons : [new Ext.Button({
text : "提交",
handler : function() {
if (dateForm.form.isValid()) {
Ext.Msg.alert("提示", "验证通过提交表单");
}
}
})]
})
}
function form7() {
Ext.QuickTips.init();
Ext.form.Field.prototype.msgTarget = "side";
var productForm = new Ext.form.FormPanel({
title : "表单加载示例",
labelWidth : 100,
width : 300,
frame : true,
labelSeparator : ": ",
applyTo : "form",
items : [new Ext.form.TextField({
fieldLabel : "产品名称",
name : "productName",
width : 150,
value : "HP5720本本"
}), new Ext.form.NumberField({
fieldLabel : "金额",
name : "price",
width : 150,
value : 100
}), new Ext.form.DateField({
fieldLabel : "生产日期",
formate : "Y年m月d日",
width : 150,
name : "date",
value : new Date()
}), new Ext.form.TextArea({
id : "introduction",
name : "introduction",
fieldLabel : "产品简介",
width : 150
})],
buttons : [new Ext.Button({
text : "加载简介",
handler : loadCallBack
})]
});
function loadCallBack() {
productForm.form.load({
waitMsg : "正在加载产品简介信息",
waitTitle : "提示",
url : "/learn/productServe.jsp",
method : "POST",
success : function(form, action) {
Ext.Msg.alert("提示", "产品加载成功");
},
failure : function(form,action) {
Ext.Msg.alert("提示", "产品简介加载失败<br/>失败原因:" + action.failureType);
}
});
}
}
function form8()
{
Ext.QuickTips.init();
Ext.form.Field.prototype.msgTarget="side";
var loginForm = new Ext.form.FormPanel({
title:"登陆",
labelWidth:60,
width:230,
frame:true,
labelSeparator:":",
applyTo:"form",
items:[
new Ext.form.TextField({
fieldLabel:"用户名",
name:"userName",
allowBlank:false,
vtype:"email"
}),
new Ext.form.NumberField({
fieldLabel:"密码",
name:"password",
allowBlank:false
})
],
buttons:[
new Ext.Button({
text:"登陆",
handler:login
}),
new Ext.Button({
text:"重置",
handler:reset
})
]
});
function login()
{
loginForm.form.submit({
clientValidation:true,waitMsg:"正在登录系统请稍后",
waitTitle:"提示",
url:"/learn/loginServe.jsp",
method:"GET",
success:function(form,action)
{
Ext.Msg.alert("提示","系统登录成功");
},
failure:function(form,action)
{
Ext.Msg.alert("提示","系统登陆失败" + action.failureType);
}});
}
function reset(){
loginForm.form.reset();
}
}
Ext.onReady(form8);
Ext.BLANK_IMAGE_URL = "/learn/ext/resources/images/default/s.gif";
Ext.QuickTips.init();
Ext.form.Field.prototype.msgTarget = "side";
var form = new Ext.form.FormPanel({
title : "用户登陆",
labelWidth : 60,
labelSeparator : ": ",
bodyStyle : "padding:15 5 5 5",
height : 120,
width : 250,
frame : true,
labelWidth : 60,
labelAlign : "right",
applyTo : "form",
items : [new Ext.form.TextField({
fieldLabel : "用户名",
id : "userName",
minLength : 6,
minLengthText : "长度不能小于6个字符",
maxLength : 20,
maxLengthText : "长度超过了20个字符",
selectOnFocus : true,
allowBlank : false,
blankText : "请填写用户名",
regex : /^([\w]+)(.[\w]+)*@([\w-]+\.){1,5}([A-Za-z]){2,4}$/,
regexText : "用户名格式错误"
}), new Ext.form.TextField({
inputType : "password",
fieldLabel : "密码",
allowBlank : false,
blankText : "请填写密码",
minLength : 6,
minLengthText : "长度不能小于6个字符",
maxLength : 20,
maxLengthText : "长度超过了20个字符"
})]
})
}
function form2() {
Ext.BLANK_IMAGE_URL = "/learn/ext/resources/images/default/s.gif";
Ext.QuickTips.init();
Ext.form.Field.prototype.msgTarget = "side";
var form = new Ext.form.FormPanel({
title : "多行文本",
labelWidth : 60,
labelSeparator : ": ",
bodyStyle : "padding:15 5 5 5",
height : 250,
width : 250,
frame : true,
labelWidth : 60,
labelAlign : "right",
applyTo : "form",
items : [new Ext.form.TextArea({
fieldLabel : "备注",
id : "memo",
width : 150
}), new Ext.form.Radio({
name : "sex",
fieldLabel : "性别",
boxLabel : "男"
}), new Ext.form.Radio({
name : "sex",
fieldLabel : "性别",
boxLabel : "女"
}), new Ext.form.Checkbox({
name : "walk",
fieldLabel : "爱好",
boxLabel : "散步"
})],
buttons : [{
text : "确定",
handler : showValue
}]
})
function showValue() {
var memo = form.findById("memo");
alert(memo.getValue());
}
}
function triggerField() {
var form = new Ext.form.FormPanel({
title : "练习Trigger",
labelSeparator : ": ",
labelWidth : 80,
bodyStyle : "padding:5 5 5 5",
frame : true,
height : 100,
width : 270,
applyTo : "form",
items : [new Ext.form.TriggerField({
id : "memo",
fieldLabel : "触发字段",
hideTrigger : false,
onTriggerClick : function(e) {
var memo = form.findById("memo");
alert(memo.getValue());
}
})]
})
}
function form4() {
var store = new Ext.data.SimpleStore({
fields : ["province", "post"],
data : [["南充", "0"], ["成都", "1"], ["广元", "2"], ["乐山", "3"]]
});
var form = new Ext.form.FormPanel({
title : "练习Trigger",
labelSeparator : ": ",
labelWidth : 80,
bodyStyle : "padding:5 5 5 5",
frame : true,
height : 100,
width : 270,
applyTo : "form",
items : [new Ext.form.ComboBox({
id : "post",
fieldLabel : "四川的城市",
triggerAction : "all",
store : store,
displayField : "province",
valueField : "post",
mode : "local",
forceSelection : true,
resization : true,
typeAhead : true,
value : "3",
handleHeight : 100
})]
})
}
function form5() {
var store = new Ext.data.SimpleStore({
proxy : new Ext.data.HttpProxy({
url : "/learn/index.jsp"
}),
fields : ["bookName"]
});
var form = new Ext.form.FormPanel({
title : "远程数据",
labelSeparator : ": ",
labelWidth : 80,
bodyStyle : "padding:5 5 5 5",
frame : true,
height : 100,
width : 270,
applyTo : "form",
items : [new Ext.form.ComboBox({
id : "book",
allQuery : "allbook",
loadingText : "正在加载数据",
minChars : 3,
queyDelay : 300,
queryParam : "searchbook",
fieldLabel : "书籍列表",
triggerAction : "all",
store : store,
displayField : "bookName",
mode : "remote"
})]
})
}
function form6() {
Ext.apply(Ext.form.VTypes, {
dateRange : function(val, field) {
if (field.dateRange) {
var beginId = field.dateRange.begin;
/** 根据组件id得到组件 */
this.beginField = Ext.getCmp(beginId);
var endId = field.dateRange.end;
this.endField = Ext.getCmp(endId);
var beginDate = this.beginField.getValue();
var endDate = this.endField.getValue();
}
if (beginDate <= endDate) {
return true;
} else {
return false;
}
},
dateRangeText : "开始日期不能大于结束日期"
});
Ext.QuickTips.init();
Ext.form.Field.prototype.msgTarget = "side";
var dateForm = new Ext.form.FormPanel({
title : "自定义form",
labelSeparator : ":",
labelWidth : 80,
bodyStyle : "padding:5 5 5 5",
frame : true,
height : 130,
width : 300,
applyTo : "form",
items : [new Ext.form.DateField({
id : "beginDate",
format : "Y年m月d日",
width : 150,
allowBlank : false,
readOnly : true,
value : new Date(),
fieldLabel : "开始日期",
dateRange : {
begin : "beginDate",
end : "endDate"
},
vtype : "dateRange"
}), new Ext.form.DateField({
id : "endDate",
format : "Y年m月d日",
width : 150,
allowBlank : false,
readOnly : true,
value : new Date(),
fieldLabel : "开始日期",
dateRange : {
begin : "beginDate",
end : "endDate"
},
vtype : "dateRange"
})],
buttons : [new Ext.Button({
text : "提交",
handler : function() {
if (dateForm.form.isValid()) {
Ext.Msg.alert("提示", "验证通过提交表单");
}
}
})]
})
}
function form7() {
Ext.QuickTips.init();
Ext.form.Field.prototype.msgTarget = "side";
var productForm = new Ext.form.FormPanel({
title : "表单加载示例",
labelWidth : 100,
width : 300,
frame : true,
labelSeparator : ": ",
applyTo : "form",
items : [new Ext.form.TextField({
fieldLabel : "产品名称",
name : "productName",
width : 150,
value : "HP5720本本"
}), new Ext.form.NumberField({
fieldLabel : "金额",
name : "price",
width : 150,
value : 100
}), new Ext.form.DateField({
fieldLabel : "生产日期",
formate : "Y年m月d日",
width : 150,
name : "date",
value : new Date()
}), new Ext.form.TextArea({
id : "introduction",
name : "introduction",
fieldLabel : "产品简介",
width : 150
})],
buttons : [new Ext.Button({
text : "加载简介",
handler : loadCallBack
})]
});
function loadCallBack() {
productForm.form.load({
waitMsg : "正在加载产品简介信息",
waitTitle : "提示",
url : "/learn/productServe.jsp",
method : "POST",
success : function(form, action) {
Ext.Msg.alert("提示", "产品加载成功");
},
failure : function(form,action) {
Ext.Msg.alert("提示", "产品简介加载失败<br/>失败原因:" + action.failureType);
}
});
}
}
function form8()
{
Ext.QuickTips.init();
Ext.form.Field.prototype.msgTarget="side";
var loginForm = new Ext.form.FormPanel({
title:"登陆",
labelWidth:60,
width:230,
frame:true,
labelSeparator:":",
applyTo:"form",
items:[
new Ext.form.TextField({
fieldLabel:"用户名",
name:"userName",
allowBlank:false,
vtype:"email"
}),
new Ext.form.NumberField({
fieldLabel:"密码",
name:"password",
allowBlank:false
})
],
buttons:[
new Ext.Button({
text:"登陆",
handler:login
}),
new Ext.Button({
text:"重置",
handler:reset
})
]
});
function login()
{
loginForm.form.submit({
clientValidation:true,waitMsg:"正在登录系统请稍后",
waitTitle:"提示",
url:"/learn/loginServe.jsp",
method:"GET",
success:function(form,action)
{
Ext.Msg.alert("提示","系统登录成功");
},
failure:function(form,action)
{
Ext.Msg.alert("提示","系统登陆失败" + action.failureType);
}});
}
function reset(){
loginForm.form.reset();
}
}
Ext.onReady(form8);
发表评论
-
Ext.form.FormPanel 独孤九剑-第三式
2008-10-22 19:44 741<!--<br /> <br /> ... -
Ext.form.FormPanel 独孤九剑-第四式
2008-10-22 23:18 807<%@ page contentType=" ... -
ext 布局 独孤九剑-第五式
2008-10-26 22:28 557<html> <head> ... -
Ext Grid 独孤九剑-第六式
2008-10-26 22:31 383<%@ page contentType=" ... -
Ext Grid 独孤九剑-第七式
2008-10-31 23:31 727/** write by Huy Vanpull */fun ... -
Ext Grid 独孤九剑-第八式
2008-11-03 00:14 712<!--<br /> <br /> ... -
关于Spket插件的安装 心得
2008-11-06 22:30 629最年学ext,他们都说spket好用,果然不错。现在将安装总结 ... -
Ext FormPanel 独孤九剑-第九式
2008-11-09 00:26 883function myForm_1() { Ex ... -
Ext 提交一个Form到Servlet
2008-11-09 01:38 819function myForm_1() { Ext. ... -
Ext Grid 综合
2008-11-12 22:32 961今晚,说不出的高兴,折磨了我好久的Grid终于可以按搜索条件分 ... -
Ext show,progress
2008-12-28 14:21 671Ext.BLANK_IMAGE_URL = " ... -
Ext Toolbar 练习
2008-12-28 16:03 839function toolbarE() { var T ...
相关推荐
Ext Form全攻略 Ext Form全攻略Ext Form全攻略Ext Form全攻略Ext Form全攻略Ext Form全攻略Ext Form全攻略Ext Form全攻略
ext form 例子,有输入框,选择框,下拉框,复选框,日历等的复杂ExtJS例子
ext form小例子 包括客户端验证 还有一个对Ext.form.Vtype 扩展
Ext form_loadExt form_loadExt form_loadExt form_loadExt form_loadExt form_loadExt form_load
Ext Form 简单示例
NULL 博文链接:https://a729812804.iteye.com/blog/1215795
Ext2.0 form使用实例的例程。这个包也包含了Ext 2.0布局实例的例程。
Ext 添加功能form表单实例 适合Ext初学者
1. Ext.form.NumberField 2. Ext.form.TextArea 3. Ext.form.TriggerField 4. Ext.form.DateField 5. Ext.form.ComboBox 6. Ext.form.TimeField
EXT的form表单ajax提交(默认提交方式) 代码如下: 1. function login(item) { 2. 3. if (validatorForm()) { 4. // 登录时将登录按钮设为disabled,防止重复提交 5. this.disabled = true; 6. 7...
对EXT.form中的相关组件,进行了详细的说明!!!!!
EXT dojochina文本框示例Ext.form.TextField.rar
EXT异步提交FORM表单的使用和,以及EXT配合struts2,sprint2.5进行前台和后台的交互解释和运用.....
ext 2.0 form demo
Ext实现的拖拽树的测试例子,里面有不少页面,其中我的测试下的Default.aspx可以运行
extjs多选下拉框,Ext.ux.form.LovCombo,extjs 以修复多选下拉框火狐下取不到值的问题,火狐下div不显示背景色的问题
Ext_Form精典布局
a.formPanel.getForm().submit({ scope: b, url: a.url, method: “post”, params: a.params, waitMsg: “正在提交数据…”, success: function(c, d) { Ext.ux.Toast.msg(“操作信息”, “成功信息保存!...
NULL 博文链接:https://jeremy102.iteye.com/blog/1961672