Icefaces RowSelector 双击

发布于 2024-12-28 17:43:00 字数 232 浏览 3 评论 0原文

我在双击处理冰面时遇到一个小问题。

似乎有两种方法可以做到这一点。

选择监听器 =>您知道是否是通过触发的 ClickActionEvent 进行双击,但您无法导航(在双击行上打开一个新的“详细信息”页面)

ClickAction =>导航 好吧,你怎么知道它是否是双击?

实现我想要实现的目标的最佳方法是什么?假设我有一个人员列表,双击一个人应该打开该人的详细信息页面。

I have a small problem with double-click handling with icefaces.

There are two methods of doing it, it seems.

SelectionListener => you know if it is a double click or not with the fired ClickActionEvent but you cannot navigate (open a new "details" page on a row double-click)

ClickAction => navigation OK, how do you know if it is a doulbe-click or not ?

What is the best way of doing what i want to achieve ? Say i have a list of persons, double click on a person should open a details page of that person.

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

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

发布评论

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

评论(1

哭了丶谁疼 2025-01-04 17:43:00

您可以使用具有属性clickListenerrowSelector标签。

单击一行时,将调用 ClickActionEvent您可以通过 ClickActionEvent.isDblClick() 在支持 bean 中确定是否双击。

对于导航,在backing bean action event中

FacesContext context = PersistentFacesState.getInstance().getFacesContext();
NavigationHandler handler = context.getApplication().getNavigationHandler();
handler.handleNavigation(context, fromAction, outcome);

也可以尝试

FacesContext.getCurrentInstance().getExternalContext().redirect(url);

You can use rowSelector tag which has attribute clickListener.

When a row is clicked ClickActionEvent is called & you can determine in backing bean, if its double-clicked or not by ClickActionEvent.isDblClick().

For navigation, in backing bean action event

FacesContext context = PersistentFacesState.getInstance().getFacesContext();
NavigationHandler handler = context.getApplication().getNavigationHandler();
handler.handleNavigation(context, fromAction, outcome);

Can also try

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