JSF 2.0 - 使用调试器逐步完成生命周期中每个阶段的方法?
我正在编写自定义 JSF 2.0 组件。有没有办法使用调试器逐步完成生命周期的每个阶段?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
我正在编写自定义 JSF 2.0 组件。有没有办法使用调试器逐步完成生命周期的每个阶段?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
在
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 theLifecycle
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 onrender()
method of the sameLifecycle
implementation.In Mojarra, the
Lifecycle
implementation is thecom.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.