我正在使用JSF 2.0中的PhaseListener.但它的方法每次都被调用两次.
@Override
public void beforePhase(PhaseEvent arg0) {
System.out.println("Start Phase "+arg0.getPhaseId()+" here the value "+ ++i +" object "+this);
}
Run Code Online (Sandbox Code Playgroud)
和输出是这样的
Start Phase RESTORE_VIEW 1 here the value 1 object com.phaseListener.MyPhaseListener@cc8c29
Start Phase RESTORE_VIEW 1 here the value 1 object com.phaseListener.MyPhaseListener@106054a
Run Code Online (Sandbox Code Playgroud)
每次被两个不同的对象调用.
请让我知道,为什么会这样?
jsf-2 ×1