fixed child display error

This commit is contained in:
EC2 Default User 2017-06-13 17:06:40 +00:00 committed by Sasank Vishnubhatla
parent 59fe4c1984
commit a217213d5e
4 changed files with 7 additions and 7 deletions

View file

@ -67,7 +67,7 @@ class ParentController {
return VIEWS_PARENT_CREATE_OR_UPDATE_FORM; return VIEWS_PARENT_CREATE_OR_UPDATE_FORM;
} else { } else {
this.parents.save(parent); this.parents.save(parent);
return "redirect:/parent/" + parent.getId(); return "redirect:/parents/" + parent.getId();
} }
} }

View file

@ -21,7 +21,7 @@
<input <input
th:replace="~{fragments/inputField :: input ('Birth Date', 'birthDate')}" /> th:replace="~{fragments/inputField :: input ('Birth Date', 'birthDate')}" />
<input <input
th:replace="~{fragments/selectField :: select ('Type', 'type', ${types})}" /> th:replace="~{fragments/selectField :: select ('Gender', 'gender', ${gender})}" />
</div> </div>
<div class="form-group"> <div class="form-group">
<div class="col-sm-offset-2 col-sm-10"> <div class="col-sm-offset-2 col-sm-10">
@ -35,4 +35,4 @@
</body> </body>
</html> </html>

View file

@ -9,7 +9,7 @@
<h2>Parent Information</h2> <h2>Parent Information</h2>
<table class="table table-striped" th:object="${parents}"> <table class="table table-striped" th:object="${parent}">
<tr> <tr>
<th>Name</th> <th>Name</th>
<td><b th:text="*{firstName + ' ' + lastName}"></b></td> <td><b th:text="*{firstName + ' ' + lastName}"></b></td>
@ -48,7 +48,7 @@
<dt>Birth Date</dt> <dt>Birth Date</dt>
<dd <dd
th:text="${#calendars.format(kid.birthDate, 'yyyy-MM-dd')}" /></dd> th:text="${#calendars.format(kid.birthDate, 'yyyy-MM-dd')}" /></dd>
<dt>Type</dt> <dt>Gender</dt>
<dd th:text="${kid.gender}" /></dd> <dd th:text="${kid.gender}" /></dd>
</dl> </dl>
</td> </td>
@ -80,4 +80,4 @@
</body> </body>
</html> </html>

View file

@ -1 +1 @@
./kill.sh && git pull && ./run.sh & ./kill.sh && git pull origin dev && ./run.sh &