我有一个显示信息的表单,网络用户可以输入一些参数来在服务器上启动查询。另外,网络用户可以创建一个新用户,所以我有另一种形式。
显示网页
@RequestMapping(method = RequestMethod.GET, value = "/secure/admin/csvUser")
public String csvUserView(Model model, Locale locale) {
model.addAttribute("userBeanList", userBeanMap);
model.addAttribute("addUserBean", new UserBean());
return VIEW_CSV_USER;
}
在我的网页上我有
<c:url var="downloadUsertUrl" value="/secure/downloadcsvUser/" />
<c:url var="deleteUserUrl" value="/secure/deleteUser/" />
<c:url var="addUserUrl" value="/secure/addUser/" />
UserBeanList 与此代码一起显示
<form id="formUser" action="${downloadUserUrl}">
<c:forEach var="userBeans" items="${userBeanList}" varStatus="statusUser">
<tr data-username="${userBeans.key}">
<td>${statusUser.count}</td>
<td>${userBeans.value.userTitle}</td>
<td align="center">
<button type="button" id="updateUserButton${statusUser.count}"></button>
<button type="button" id="deleteUserButton${statusUser.count}"></button>
<input id="downloadUserButton${statusUser.count}" type="image" height="25" width="25" src="${contextPath}/resources/images/addUser.png"/>
</td>
</tr>
</c:forEach>
</form>
当我单击添加用户时,此对话框打开
<div id="createUser" title="Add a user" style="display:none">
<fieldset>I do
<form:form actions="${addUserUrl}" modelAttribute="addUserBean">
...
</form:form>
</fieldset>
</div>
I have problem with this form, it generated with two actions, one with this url: /secure/addUser/ and one with /secure/admin/csvUser
I don't understand why