我有一个显示信息的表单,Web用户可以输入一些参数在服务器上启动查询。 此外,网络用户可以创建一个新用户,所以我有另一种形式。
要显示网页,请执行
@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
答案 0 :(得分:0)
似乎是一个废话在缓存或类似的东西,我重新启动我的ide,它很好