简体   繁体   中英

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. 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. 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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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