【发布时间】:2016-01-23 07:20:47
【问题描述】:
我在将模型绑定到表单视图时遇到了问题,我遇到了错误
Property or field 'city' cannot be found on null
我正在尝试将String place.location.city 绑定到我的视图
<form role="form" th:action="${flowExecutionUrl}" th:object="${place}" method="post">
<input class="form-control" th:field="*{location.city}"/>
<!-- ... -->
</form>
这是我遇到错误的子流的 xml
<view-state id="mapView" view="/places/add/location" model="place">
<transition on="locationSelected" to="locationReady"/>
</view-state>
<end-state id="locationReady">
</end-state>
【问题讨论】:
标签: java spring spring-mvc thymeleaf spring-webflow