简体   繁体   English

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

[英]JSF 2.0 - Way to step through each of the phases in a lifecycle with a debugger?

I'm writing custom JSF 2.0 components. 我正在编写自定义JSF 2.0组件。 Is there way to step through each of the phases in a lifecycle with a debugger? 有没有办法通过调试器逐步完成生命周期中的每个阶段?

Put a breakpoint on the execute() method of the Lifecycle implementation of your JSF implementation. 在JSF实现的Lifecycle实现的execute()方法上放置一个断点。 It's there where each phase of the JSF lifecycle expect of the render response will be executed. 在这里,将执行JSF生命周期每个阶段对呈现响应的期望。 To hook on render response as well, put another beakpoint on render() method of the same Lifecycle implementation. 要也钩住渲染响应,请在同一Lifecycle实现的render()方法上放置另一个beakpoint。

In Mojarra, the Lifecycle implementation is the com.sun.faces.lifecycle.LifecycleImpl class. 在Mojarra中, Lifecycle实现是com.sun.faces.lifecycle.LifecycleImpl类。 It's open source (so is MyFaces), you can download the source at the vendor's homepage such as http://javaserverfaces.java.net . 它是开源的(MyFaces也是如此),您可以在供应商的主页上下载源代码,例如http://javaserverfaces.java.net

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM