关于struts 与html标签混用提交的问题
<%@ page contentType="text/html; charset=GBK"%><%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@page import="com.vanf.sysmanage.*" %>
<%@page import="java.util.ArrayList" %>
<%@page import="java.util.HashMap" %>
<%
ArrayList opslist = new ArrayList();
ArrayList allist = new ArrayList();
UserUtil oo = new UserUtil();
String roleid = request.getParameter("roleid");
String mid = request.getParameter("mid");
String userid_w = request.getParameter("userid_w");
opslist = oo.getselectop(roleid);
allist = oo.getallop();
HashMap opMap = new HashMap();
opMap = oo.getOpmap();
session.setAttribute("opMap",opMap);
%>
<html>
<head>
<script language="javascript">
function doSave(){
document.RoleForm.submit();
}
</script>
</head>
<body>
<html:form action="/RoleManageAction.do">
<html:hidden property="doType" value="editRight"/>
<html:hidden property="roleid" value="<%=roleid%>"/>
<html:hidden property="mid" value="<%=mid%>"/>
<html:hidden property="userid_w" value="<%=userid_w%>"/>
<tr>
<td align="center" height="20">
<%Boolean enable = false;
String opid = null;
for(int i=0;i<allist.size();i++){
for(int j=0;j<opslist.size();j++){
if(allist.get(i).equals(opslist.get(j))){
enable = true;
opid = (String)opslist.get(j);
break;
}else{
opid = (String)opslist.get(i);
}
}
%>
<input type="checkbox" name="selectmstr" value="<%=opid%>" <%=enable?"checked":""%>>
<%=(String)opMap.get(opid)%>
<% }%>
</td>
</td>
</html:form>
</tr>
<br>
<td>
<input type="submit" value="保存">
<input type="button" value="取消" onclick="window.history.go(-1);">
</td>
</body>
</html>
文件如上 ,问题出在没法传值到制定的action中!!请大家指教
目前试验的结果无法在提交这个动作上混用html与struts,只能使用类似一下
<form name="RoleForm" action="**" method="post">
<input type="submit" value="submit">
如果是隐式传值则用<input type="hidden" name="**" value="**">
[[it] 本帖最后由 cheesetree 于 2008-5-30 19:13 编辑 [/it]]