Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Spravochnik extends BaseEntity {
- private List<String> columnName;
- private List<List<String>> valuesInRows;
- public List<String> getColumnName() {
- return columnName;
- }
- public void setColumnName(List<String> columnName) {
- this.columnName = columnName;
- }
- public List<List<String>> getValuesInRows() {
- return valuesInRows;
- }
- public void setValuesInRows(List<List<String>> valuesInRows) {
- this.valuesInRows = valuesInRows;
- }
- }
- <table class="table">
- <thead class="thead-dark">
- <tr>
- <c:forEach var="columnName" items="${sprav.columnName}">
- <th>${columnName}</th>
- </c:forEach>
- </tr>
- </thead>
- <tbody>
- <c:forEach var="valuesInRows" items="${sprav.valuesInRows}">
- <tr>
- <c:forEach var="valuesInRow" items="${valuesInRows}">
- <td>${valuesInRow}</td>
- </c:forEach>
- </tr>
- <s:url var="url_save" value="/spravochnik/save"/>
- <f:form method="POST" action="${url_save}" modelAttribute="sprav">
- <tr>
- <c:forEach var="columnName" items="${sprav.columnName}">
- <td><f:input path="${columnName}"></f:input></td>
- </c:forEach>
- </tr>
- </f:form>
- </c:forEach>
- </tbody>
- </table
- `
- My error:
- Invalid property 'salary' of bean class [net.lacit.militaryRegistr.entity.Spravochnik]: Bean property 'salary' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?
- I understand that there is no explicit getter/setter for the salary field, but how to bind this form? thanks in advance!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement