当前位置: 代码迷 >> Ajax >> ext4 Ext.form.Panel 非ajax交付
  详细解决方案

ext4 Ext.form.Panel 非ajax交付

热度:1049   发布时间:2012-09-21 15:47:26.0
ext4 Ext.form.Panel 非ajax提交

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

  相关解决方案