同様の問題がこのフォーラムの多くの投稿で引き起こされています。しかし、誰もその特定の解決策を持っていません、私はこれで私を助けてくれてありがとう:
私はSpringを使用してWebアプリケーションを開発していますが、c:foreachの中にあるform:checkboxタグのパスに何を入れるべきかわかりません。コードは次のとおりです。
<c:forEach items="${persons}" var="person" varStatus="i">
<tr>
<td><c:out value="${person.firstName}" /></td>
<td><c:out value="${person.lastName}" /></td>
<td><form:checkbox path="person.rights" value="Download"/>Download </td>
<td><form:checkbox path="person.rights" value="Delete"/>Delete </td>
</tr>
</c:forEach>
' rights
'は、春のドキュメントで定義されている文字列のリストです。他のプロパティと同様にゲッターとセッターがあり、チェックボックスはタグの外側で機能しますc:foreach
が、このタグに含めると、この例外が生成されます。
org.springframework.beans.NotReadablePropertyException: Invalid property 'person' of bean class [java.util.ArrayList]: Bean property 'person' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?
あなたは問題が何であるかについての考えを持っていますか?