Добавление сообщения лиц на перенаправленную страницу с помощью ExternalContext.redirect ()

Error: User Rate Limit ExceededExternalContext.redirect(String);Error: User Rate Limit Exceeded

FacesContext.getCurrentInstance().addMessage(new FacesMessage("Bla bla bla..."));
FacesContext.getCurrentInstance().getExternalContext().getFlash().setKeepMessages(true);
ExternalContext ec = FacesContext.getCurrentInstance().getExternalContext();
ec.redirect(ec.getRequestContextPath() + "/scenario.xhtml");

Error: User Rate Limit ExceededFlash.setKeepMessages(true);Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Ответы на вопрос(2)

Решение Вопроса

Error: User Rate Limit ExceededpreRenderViewError: User Rate Limit ExceededELFlashError: User Rate Limit ExceededFlashError: User Rate Limit ExceededExternalContext#getFlash()Error: User Rate Limit Exceeded

Error: User Rate Limit ExceededELFlash:

if (currentPhase.getOrdinal() < PhaseId.RENDER_RESPONSE.getOrdinal()) {
    flashInfo = flashManager.getPreviousRequestFlashInfo();
} else {
    flashInfo = flashManager.getNextRequestFlashInfo(this, true);
    maybeWriteCookie(context, flashManager);
}

Error: User Rate Limit ExceededmaybeWriteCookieError: User Rate Limit Exceeded

Error: User Rate Limit ExceededELFlashError: User Rate Limit ExceededBasicallyError: User Rate Limit ExceededINVOKE_APPLICATIONError: User Rate Limit ExceededpostInvokeActionError: User Rate Limit Exceeded<f:viewAction>Error: User Rate Limit Exceeded

<f:viewAction action="#{bean.onload}" />

Error: User Rate Limit ExceededComponentSystemEvent.

@NamedEvent(shortName="postInvokeAction")
public class PostInvokeActionEvent extends ComponentSystemEvent {

    public PostInvokeActionEvent(UIComponent component) {
        super(component);
    }

}

Error: User Rate Limit ExceededPhaseListenerError: User Rate Limit ExceededINVOKE_APPLICATION.

public class PostInvokeActionListener implements PhaseListener {

    @Override
    public PhaseId getPhaseId() {
        return PhaseId.INVOKE_APPLICATION;
    }

    @Override
    public void beforePhase(PhaseEvent event) {
        // NOOP.
    }

    @Override
    public void afterPhase(PhaseEvent event) {
        FacesContext context = FacesContext.getCurrentInstance();
        context.getApplication().publishEvent(context, PostInvokeActionEvent.class, context.getViewRoot());
    }

}

Error: User Rate Limit Exceededfaces-config.xml

<lifecycle>
    <phase-listener>com.example.PostInvokeActionListener</phase-listener>
</lifecycle>

Error: User Rate Limit Exceeded

<f:event type="postInvokeAction" listener="#{bean.onload}" />

UpdateError: User Rate Limit ExceededError: User Rate Limit ExceededError: User Rate Limit ExceededInvokeActionEventListener showcase example.

Error: User Rate Limit Exceeded

Error: User Rate Limit ExceededbeforeError: User Rate Limit Exceeded

FacesContext context = FacesContext.getCurrentInstance();
context.getExternalContext().getFlash().setKeepMessages(true);

Error: User Rate Limit ExceededError: User Rate Limit ExceededError: User Rate Limit Exceeded

Ваш ответ на вопрос