mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-18 05:25:50 +00:00
fixed child display error
This commit is contained in:
parent
59fe4c1984
commit
a217213d5e
4 changed files with 7 additions and 7 deletions
|
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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">
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
./kill.sh && git pull && ./run.sh &
|
./kill.sh && git pull origin dev && ./run.sh &
|
||||||
|
|
Loading…
Reference in a new issue