100,就求各位大哥给我一个struts1的指点!
我用window.open()打开一个新页面,执行添加之后想再调用父页面的查询操作显示添加内容,相信大家也做过吧。
在父页面中添加一个hidden值,判断button类型,然后
function submitForm(act) {
//判断事件类型
document.getElementById( 'status ').value = act;
//提交
document.F00009Form.submit();
}
传值。F00009Form在Session中
再进行save操作后,程序如下:
String strActionStatus = f00009form.getStatus();
if((Constant.SAVE).equals(strActionStatus)){
//Add操作
if(operation.saveAction(dateManageForm,request)){
//
operation.searchAction(dateManageForm, request);
//回F00009页面
return(mapping.findForward(Constant.SUCCESS));
}
return(mapping.findForward(Constant.FAIL));
}
struts.config内容如下:
<action path= "/F00009 "
name= "F00009Form "
type= "team4.StrutsAction.F00009Action "
scope= "session "
input= "/F00009.jsp "
validate= "true ">
<forward name= "success " path= "/jsp/F00009.jsp " />
<forward name= "search " path= "/F00009.do " />
<forward name= "fail " path= "/jsp/F00009.jsp " />
</action>
当然我也想调用
if((Constant.SAVE).equals(strActionStatus)){
//Add操作
if(operation.saveAction(f0009form,request)){
//
operation.searchAction(f0009form, request);
f00009form.setStatus( "search ");
//回F00009页面
&nbs