日期:2014-05-16 浏览次数:20562 次
ext4 非ajax提交方式如下:
?form:Ext.create('Ext.form.Panel',{
? ?region : 'center',
? ?border : false,??
??bodyPadding: 20,
??standardSubmit:true,
??defaults : {
????selectOnFocus:true,
????msgTarget: 'side',
????xtype:'textfield',
????maxLength:45,
????allowBlank:false,
????labelAlign : 'right'
????},
?? items:[]);
submit按钮事件如下:
var frm = this.down('form').getForm();
? ?if(frm.isValid()){
?????? frm.submit({
??????????????????? url:'j_spring_security_check'
??????????????? });
? ?}
其中最关键的属性是standardSubmit:true。
有关standardSubmit的描述如下:
If set to true, a standard HTML form submit is used instead of a XHR (Ajax) style form submission. Defaults to false. All of the field values, plus any additional params configured via baseParams and/or the options
to submit, will be included in the values submitted in the form