gpt4 book ai didi

java - 包含 2 个操作的表单(不正常)

转载 作者:行者123 更新时间:2023-12-01 04:13:43 25 4
gpt4 key购买 nike

我有一个显示信息的表单,网络用户可以输入一些参数来在服务器上启动查询。另外,网络用户可以创建一个新用户,所以我有另一种形式。

要显示网页,请执行以下操作

@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

最佳答案

好像缓存中有垃圾或类似的东西,我重新启动了我的IDE,一切都很好

关于java - 包含 2 个操作的表单(不正常),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19639589/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com