<bean:write name="alist" property="aTime.time" formatKey="messages.common.formatDateToDay" format="yyyy-MM-dd"/>aTime是一个日期值,可能为空,当为空的时候,就报错,如下:
Invalid argument looking up property aTime.time of bean alist怎么能判断为空的时候,不报错显示正常
Invalid argument looking up property aTime.time of bean alist怎么能判断为空的时候,不报错显示正常
<!--aTime.time为空的时候执行这里的语句-->
<bean:write name="alist" property="aTime.time" formatKey="messages.common.formatDateToDay" format="yyyy-MM-dd"/>
</logic:present><logic:notPresent name="alist" property="aTime.time">
<!--aTime.time不为空的时候执行这里的语句-->
aTime为空
</logic:notPresent>