Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. public class Spravochnik extends BaseEntity {
  2.  
  3. private List<String> columnName;
  4. private List<List<String>> valuesInRows;
  5. public List<String> getColumnName() {
  6. return columnName;
  7. }
  8. public void setColumnName(List<String> columnName) {
  9. this.columnName = columnName;
  10. }
  11. public List<List<String>> getValuesInRows() {
  12. return valuesInRows;
  13. }
  14. public void setValuesInRows(List<List<String>> valuesInRows) {
  15. this.valuesInRows = valuesInRows;
  16. }
  17.  
  18.  
  19.  
  20. }
  21.  
  22. <table class="table">
  23. <thead class="thead-dark">
  24. <tr>
  25. <c:forEach var="columnName" items="${sprav.columnName}">
  26. <th>${columnName}</th>
  27. </c:forEach>
  28. </tr>
  29. </thead>
  30. <tbody>
  31. <c:forEach var="valuesInRows" items="${sprav.valuesInRows}">
  32. <tr>
  33. <c:forEach var="valuesInRow" items="${valuesInRows}">
  34. <td>${valuesInRow}</td>
  35. </c:forEach>
  36. </tr>
  37. <s:url var="url_save" value="/spravochnik/save"/>
  38. <f:form method="POST" action="${url_save}" modelAttribute="sprav">
  39. <tr>
  40. <c:forEach var="columnName" items="${sprav.columnName}">
  41. <td><f:input path="${columnName}"></f:input></td>
  42. </c:forEach>
  43. </tr>
  44. </f:form>
  45. </c:forEach>
  46. </tbody>
  47. </table
  48.  
  49. `
  50. My error:
  51. 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?
  52. 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