docs
This commit is contained in:
@@ -67,6 +67,8 @@ public class FlowActionListener implements ActionListener {
|
||||
logger.debug("No action event detected");
|
||||
context.getExternalContext().getRequestMap().remove(JsfView.EVENT_KEY);
|
||||
}
|
||||
// tells JSF lifecycle that rendering should now happen and any subsequent phases should be skipped
|
||||
// required in the case of this action listener firing immediately (immediate=true) before validation
|
||||
context.renderResponse();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,6 +167,7 @@ public class FlowFacesContext extends FacesContext {
|
||||
}
|
||||
|
||||
public void renderResponse() {
|
||||
// stored in flash scope to survive a redirect when transitioning from one view to another
|
||||
context.getFlashScope().put(RENDER_RESPONSE_KEY, Boolean.TRUE);
|
||||
}
|
||||
|
||||
|
||||
@@ -103,6 +103,7 @@ public class JsfView implements View {
|
||||
try {
|
||||
if (restored && !facesContext.getResponseComplete() && !facesContext.getRenderResponse()) {
|
||||
facesLifecycle.execute(facesContext);
|
||||
// TODO move this and renderResponse behavior into lifecycle
|
||||
validateModel(facesContext);
|
||||
}
|
||||
} finally {
|
||||
|
||||
@@ -68,6 +68,8 @@ public class JsfViewFactory implements ViewFactory {
|
||||
FacesContext facesContext = FlowFacesContext.newInstance(context, lifecycle);
|
||||
try {
|
||||
if (!facesContext.getRenderResponse()) {
|
||||
// only publish a RESTORE_VIEW event if this is the first phase of the lifecycle
|
||||
// this won't be true when this method is called after a transition from one view-state to another
|
||||
JsfUtils.notifyBeforeListeners(PhaseId.RESTORE_VIEW, lifecycle, facesContext);
|
||||
}
|
||||
ViewHandler viewHandler = facesContext.getApplication().getViewHandler();
|
||||
|
||||
Reference in New Issue
Block a user