gpt4 book ai didi

java - 单击提交按钮时不执行任何操作

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

当单击提交按钮时,没有任何反应。只点击,不会调用 Controller 方法。完全不确定为什么。我尝试了多种提交方法。外部表单和内联表单。

<table border="1">
<tr>
<td><spring:message code="label.id" /></td>
<td><spring:message code="label.name" /></td>
<td><spring:message code="label.abv" /></td>
<td><spring:message code="label.Buy" /></td>
<td><spring:message code="label.Sell" /></td>
<td><spring:message code="label.LastMod" /></td>
<td><spring:message code="label.Description" /></td>
<td><spring:message code="label.image" /></td>
<td><spring:message code="label.catagory" /></td>
<td><spring:message code="label.style" /></td>
<td><spring:message code="label.actions" /></td>
</tr>
<c:forEach items="${Beers}" var="Beers">
<tr>
<td>${Beers.id}</td>
<td>${Beers.name}</td>
<td>${Beers.abv}</td>
<td>${Beers.buyPrice}</td>
<td>${Beers.sellPrice}</td>
<td>${Beers.lastMod}</td>
<td>${Beers.description}</td>
<td><img src="../assets/images/no_image.jpg" alt="<spring:message code="label.image" />"/></td>
<td>${Beers.catId}</td>
<td>${Beers.styleId}</td>
<td>
//PROBLEM HERE
<form:form method="POST" action="/TasteLimerickBeersB/Beers/UpdateBeerPrice?id=${Beers.id}" modelAttribute="priceIncrease">

<label for="priceIncrease"><spring:message code="label.percentage" /></label>
<input type="text" name="priceIncrease" maxlength="4" max="100" pattern="[+-?0-9]+([\.][0-9]{0,2})?">

<button type="submit" value="Submit!"><spring:message code="submit.button" /></button>
</form:form>

</td>
</tr>

</c:forEach>

最佳答案

<%@ taglib prefix="form"uri="http://www.springframework.org/tags/form"%>对于任何落入同样陷阱的人来说,这句话都缺失了......

关于java - 单击提交按钮时不执行任何操作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60710744/

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