2
如果requestParameters.sortBy
作爲字符串(java.lang.NumberFormatException
)或丟失(java.lang.NullPointerException
)傳遞,如何防止異常, ?Spring Web Flow異常處理
<view-state id="journeySearch" model="journeyForm">
...
<transition on="sort">
<set name="journeyCriteria.sortBy" value="requestParameters.sortBy" type="int" />
<evaluate expression="bookingService.searchJourneys(journeyCriteria)" result="viewScope.journeys" />
</transition>
</view-state>