首页 > 解决方案 > 如何每次在弹出窗口中更新当前日期?

问题描述

我有一个包含两列(由创建和更新)'与 EO,VO 的表。我在视图对象中使用表达式“adf.currentDateTime”插入了当前日期和时间。同样,我想在每次更改数据的同时捕获更新的日期和时间。

标签: oracle-adf

解决方案


您将 View Object 日期属性的默认值设置为“adf.currentDateTime”是正确的,因为它默认为触发 View 对象时的当前时间。

“在每次更改数据的同时捕获更新的日期和时间”在您的 Jsf 中只需输入 inputDate 属性immediate="true"autoSubmit="true"这样当用户在 UI 中更改日期时,它将更新值实时查看对象。

<af:inputDate value="#{row.bindings.Date.inputValue}" autoSubmit="true" immediate="true" id="id1">
 <f:validator binding="#{row.bindings.CreationDate.validator}"/>
 <af:convertDateTime pattern="#{bindings.VO.hints.Date.format}"/>
</af:inputDate>

推荐阅读