如何防止异常,如果requestParameters.sortBy
作为字符串()传递java.lang.NumberFormatException
或缺少(java.lang.NullPointerException
)?
<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>