在阶段监听器中,我无法停止处理。 jsf不关心我的回复完成调用。如何在阶段监听器中停止处理?
@Override
public PhaseId getPhaseId() {return PhaseId.RESTORE_VIEW;}
@Override
public void beforePhase(PhaseEvent event) {}
@Override
public void afterPhase(PhaseEvent event) {
FacesContext fc = FacesContext.getCurrentInstance();
UIViewRoot viewRoot = fc.getViewRoot();
if (checkweirdcase()) {
LOGGER.debug("ViewId " + viewRoot.getViewId());
} else {
event.getFacesContext().responseComplete();
}
LOGGER.debug(event.getPhaseId());
}