JSF 2.0 - 使用调试器逐步完成生命周期中每个阶段的方法?

发布于 2024-12-17 21:04:03 字数 51 浏览 0 评论 0 原文

我正在编写自定义 JSF 2.0 组件。有没有办法使用调试器逐步完成生命周期的每个阶段?

I'm writing custom JSF 2.0 components. Is there way to step through each of the phases in a lifecycle with a debugger?

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

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

发布评论

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

评论(1

最舍不得你 2024-12-24 21:04:03

execute() 方法href="http://docs.oracle.com/javaee/6/api/javax/faces/lifecycle/Lifecycle.html" rel="nofollow">Lifecycle 实现您的JSF 实施。在这里,JSF 生命周期的每个阶段都会执行渲染响应。要同时挂钩渲染响应,请在 render() 相同 Lifecycle 实现的方法。

在 Mojarra 中,Lifecycle 实现是 com.sun.faces.lifecycle.LifecycleImpl 类。它是开源的(MyFaces 也是如此),您可以在供应商的主页上下载源代码,例如 http://javaserverfaces.java.net

Put a breakpoint on the execute() method of the Lifecycle implementation of your JSF implementation. It's there where each phase of the JSF lifecycle expect of the render response will be executed. To hook on render response as well, put another beakpoint on render() method of the same Lifecycle implementation.

In Mojarra, the Lifecycle implementation is the com.sun.faces.lifecycle.LifecycleImpl class. It's open source (so is MyFaces), you can download the source at the vendor's homepage such as http://javaserverfaces.java.net.

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