将 selectInputDate 中的日期设置为对象

发布于 2024-08-26 08:10:21 字数 495 浏览 4 评论 0原文

我有一个日期控制器可以做各种事情。设置日历日期后,我想将值从日期控制器传递到另一个 bean。我遇到的问题是 setPropertyActionListener 在用户单击日期之前被调用。

有没有办法从 selectInputDate 选择后获取日期并传递给 bean?

这是我尝试过的:

<ice:selectInputDate popupDateFormat="dd-MMM-yyyy" renderAsPopup="true"  value="#{dateRangeDateContoller.end}" >
    <f:setPropertyActionListener target="#{searchParameters.endDate}" value="#{dateRangeDateContoller.end}" />
</ice:selectInputDate>  

I have a date controller which does various things. Once a calendar date is set, I want to pass the value from the date controller to another bean. The problem I have is that the setPropertyActionListener gets called before the user clicks on a date.

Is there a way to get the date from the selectInputDate after selection and pass to a bean?

This is what I tried:

<ice:selectInputDate popupDateFormat="dd-MMM-yyyy" renderAsPopup="true"  value="#{dateRangeDateContoller.end}" >
    <f:setPropertyActionListener target="#{searchParameters.endDate}" value="#{dateRangeDateContoller.end}" />
</ice:selectInputDate>  

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

凉城凉梦凉人心 2024-09-02 08:10:21

尝试设置 partialSubmit="false"

Try setting partialSubmit="false".

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文