比如说,action中有一个actionForm对象,但是actionForm对象中还有一个user对象,我想把jsp中的form中的信息通过ajax提交直接封装进user之中,怎么写啊?一层会写,两层就不知道了。求教各位大神!!!!!
前台是一个关于用户的信息form
<form></form>
后台:
action中有:
private ActionForm actionForm;
ActionForm这个类中有:
private User user;jQueryAjaxJSP序列化
前台是一个关于用户的信息form
<form></form>
后台:
action中有:
private ActionForm actionForm;
ActionForm这个类中有:
private User user;jQueryAjaxJSP序列化
解决方案 »
- Spring和XFire结合出错问题
- j2ee
- tomcat 6 如何将管理介面 与 应用 分开呢?
- 救命呀,webwork+spring+hibernate时Tomcat启动出问题
- 怎样定义隐藏项?
- 开始看Struts in Action一书时遇到的问题
- 如何构筑J2EE的运行环境? 我只知道J2SE的,
- 关于JBuilder的DataExpress
- java.lang.ClassNotFoundException: org.apache.logging.log4j.Logger
- spring boot 的junit单元测试报错。求大家~~帮忙看看。。。
- 如何利用Jsoup根据已知关键字取得html重要的内容
- java 程序中获取ibatis 的执行语句
###################################################
var result=$("#actionForm.cust").serialize();
$.ajax({
type : "post",
data:result,
url : "<%=request.getContextPath()%>/resource/assign/resActionVerifyAction!addCust.do",
success : function(msg) {
alert(msg);
},
error : function(XMLHttpRequest, textStatus, errorThrown) {
alert(errorThrown);
}
});###########################################################
<form method="post" name="actionForm.cust" id="actionForm.cust">
<table>
<tr>
<td>
<label>客户编号</label></td><td><input type="text" name="actionForm.cust.custId"></td>
<td>
<label>上级客户编号</label></td><td><input type="text" name="actionForm.cust.parentCustId"></td>
</tr>###############################
public class ResActionVerifyAction extends Action {
/**
*
*/
private static final long serialVersionUID = 1L;
private String CustName;
protected ResActionVerifyActionForm actionForm;
#########################################
public class ResActionVerifyActionForm extends PageGridActionForm {
/**
*
*/
private static final long serialVersionUID = 3402939650277627683L;
private CustMVO custMVO=new CustMVO();
private CustSVO cust=new CustSVO();