如题,现在我可以在action中用request.get的方法得到表单数据,请问还有别的方法么?
对于很多表单字段需要提取,如何处理
对于很多表单字段需要提取,如何处理
解决方案 »
- jms怎么使用
- 在Spring中使用JOTM管理双数据源,配置了事务但没有回滚,请各兄弟指点
- jsp展现层和servlet、hibernate的层次能否分开部署在不同的服务器上?
- 刚进公司 面临一个问题
- struts2 getter、setter传值问题
- jsp中上传文件,如何配置jspsmartupload呢
- struts文件上传的问题
- Linux Service Center 社区源代码公测下载--测试奖分
- ■■请问高手,如果要对多表同时操作(在一句sql语句中),一定要用BMP???CMP不可以???
- java转码问题 把一串字符串转换为汉字
- JPA-style positional param was not an integral ordinal
- struts2 用的多吗?
win.title = '修改考勤信息';
if(!form){
form = new Ext.FormPanel({
labelWidth : 75,
//url :'UpdateEmployee.action',
frame : true,
bodyStyle : 'padding:5px 5px 0',
width : 340,
defaults : {
width : 230
},
defaultType : 'textfield',
standardSubmit : true,
items : [{
fieldLabel : 'id',
name : 'employee_id',
readOnly : true
}, {
fieldLabel : '姓名',
name:'name',
allowBlank : false
}, {
fieldLabel : '业务室',
name : 'department'
}, {
fieldLabel : '上午',
name : 'morning'
}, {
fieldLabel : '下午',
name : 'afternoon'
}, {
fieldLabel : '日期',
name : 'datenote'
}, {
fieldLabel : '备注',
name : 'note'
}],
buttons : [{
text : '保存',
// formBind : true,
type : 'submit',
// 定义表单提交事件
handler : function() {
if (form.form.isValid()) {// 验证合法后使用加载进度条
// 提交到服务器操作
form.form.doAction('submit', {
url : '../UpdateEmployee.action',// 文件路径
method : 'post',// 提交方法post或get
params : '',
// 提交成功的回调函数
failure : function(retForm, retAction) {
if (retAction.result && retAction.result == '1') {
Ext.MessageBox.alert('提示', '保存数据成功!');
win.hide();
/* var totalCount = ptb.store.getTotalCount();
var pageSize = ptb.pageSize;
var div = parseInt(totalCount / pageSize);
var mol = totalCount % pageSize;
ptb.cursor = div * pageSize;*/
ds.load({
params : {
start : 0,
limit : 10
}
}); } else if (retAction.result
&& retAction.result == 'error') {
Ext.MessageBox.alert('提示', '保存数据失败!');
} else {
Ext.Msg.alert('错误', '服务器出现错误请稍后再试!');
}
},
waitMsg : '保存数据...'
});
}
}
}, {
text : '取消',
handler : function() {
form.form.reset();
}// 重置表单
}]
});
}
return form;
//////////////////////////////
public String UpdateEmployee() {
//System.out.println(this.employee.getEmployee_id() + "---" + this.employee.getName() + "---");
this.setJsonString("{success:true}");
System.out.println(this.getJsonString());
try {
this.getEmployeeService().updateEmployee(this.getEmployee());
} catch (Exception e) {
e.printStackTrace();
}
return SUCCESS;
}
///////////////////////////////////////
怎么是这个错误呢?attempt to create saveOrUpdate event with null entity