@Override public void encodeEnd(final FacesContext arg0) throws IOException { super.encodeEnd(arg0); }
@Override public void encodeEnd(final FacesContext arg0) throws IOException { super.encodeEnd(arg0); }
/** * @see javax.faces.component.UIComponentBase#encodeEnd(javax.faces.context.FacesContext) */ @Override public void encodeEnd(FacesContext context) throws IOException { setRowIndex(-1); super.encodeEnd(context); }
/** * <p>Override the default {@link UIComponentBase#encodeEnd} * behavior. If {@link #getAfterPhaseListener} returns * non-<code>null</code>, invoke it, passing a {@link PhaseEvent} * for the {@link PhaseId#RENDER_RESPONSE} phase. Any errors that * occur during invocation of the afterPhase listener must be * logged and swallowed.</p> */ @Override public void encodeEnd(FacesContext context) throws IOException { super.encodeEnd(context); notifyAfter(context, PhaseId.RENDER_RESPONSE); }
@Override public void encodeEnd(FacesContext context) throws IOException { createPagedDataInRequestMap(context); super.encodeEnd(context); }
public void encodeEnd(FacesContext context) throws java.io.IOException { checkNull(context, "context"); super.encodeEnd(context); try { notifyListeners(context, PhaseId.RENDER_RESPONSE, getAfterPhaseListener(), false); } catch (Exception e) { // following the spec we have to swallow the exception logger.log(Level.SEVERE, "Exception while processing phase listener: " + e.getMessage(), e); } }
/** * <p class="changed_added_2_0"><span class="changed_modified_2_3">If</span> * {@link #getAfterPhaseListener} returns non-<code>null</code>, invoke it, passing a {@link * PhaseEvent} for the {@link PhaseId#RENDER_RESPONSE} phase. Any * {@code Exception}s that occur during invocation of the afterPhase listener * must be logged and swallowed, <span class="changed_added_2_3"> * unless the {@link #VIEWROOT_PHASE_LISTENER_QUEUES_EXCEPTIONS_PARAM_NAME} * parameter is set. In that case, the {@code Exception} must be passed to the * {@link javax.faces.context.ExceptionHandler} as well.</span>. If the * current view has view parameters, as indicated by a non-empty and * non-<code>UnsupportedOperationException</code> throwing return * from {@link javax.faces.view.ViewDeclarationLanguage#getViewMetadata(javax.faces.context.FacesContext, String)}, * call {@link UIViewParameter#encodeAll} on each parameter. If * calling <code>getViewParameters()</code> causes * <code>UnsupportedOperationException</code> to be thrown, the * exception must be silently swallowed.</p> */ @Override public void encodeEnd(FacesContext context) throws IOException { super.encodeEnd(context); encodeViewParameters(context); notifyAfter(context, PhaseId.RENDER_RESPONSE); }
/** * <p class="changed_added_2_0"> If {@link #getAfterPhaseListener} * returns non-<code>null</code>, invoke it, passing a {@link * PhaseEvent} for the {@link PhaseId#RENDER_RESPONSE} phase. Any * errors that occur during invocation of the afterPhase listener * must be logged and swallowed. If the current view has view * parameters, as indicated by a non-empty and * non-<code>UnsupportedOperationException</code> throwing return * from {@link javax.faces.view.ViewDeclarationLanguage#getViewMetadata(javax.faces.context.FacesContext, String)}, * call {@link UIViewParameter#encodeAll} on each parameter. If * calling <code>getViewParameters()</code> causes * <code>UnsupportedOperationException</code> to be thrown, the * exception must be silently swallowed.</p> */ @Override public void encodeEnd(FacesContext context) throws IOException { super.encodeEnd(context); encodeViewParameters(context); notifyAfter(context, PhaseId.RENDER_RESPONSE); }
/** * <p class="changed_added_2_0"><span class="changed_modified_2_3">If</span> * {@link #getAfterPhaseListener} returns non-<code>null</code>, invoke it, passing a {@link * PhaseEvent} for the {@link PhaseId#RENDER_RESPONSE} phase. Any * {@code Exception}s that occur during invocation of the afterPhase listener * must be logged and swallowed, <span class="changed_added_2_3"> * unless the {@link #VIEWROOT_PHASE_LISTENER_QUEUES_EXCEPTIONS_PARAM_NAME} * parameter is set. In that case, the {@code Exception} must be passed to the * {@link javax.faces.context.ExceptionHandler} as well.</span>. If the * current view has view parameters, as indicated by a non-empty and * non-<code>UnsupportedOperationException</code> throwing return * from {@link javax.faces.view.ViewDeclarationLanguage#getViewMetadata(javax.faces.context.FacesContext, String)}, * call {@link UIViewParameter#encodeAll} on each parameter. If * calling <code>getViewParameters()</code> causes * <code>UnsupportedOperationException</code> to be thrown, the * exception must be silently swallowed.</p> */ @Override public void encodeEnd(FacesContext context) throws IOException { super.encodeEnd(context); encodeViewParameters(context); notifyAfter(context, PhaseId.RENDER_RESPONSE); }
/** * <p class="changed_added_2_0"> If {@link #getAfterPhaseListener} * returns non-<code>null</code>, invoke it, passing a {@link * PhaseEvent} for the {@link PhaseId#RENDER_RESPONSE} phase. Any * errors that occur during invocation of the afterPhase listener * must be logged and swallowed. If the current view has view * parameters, as indicated by a non-empty and * non-<code>UnsupportedOperationException</code> throwing return * from {@link javax.faces.view.ViewDeclarationLanguage#getViewMetadata(javax.faces.context.FacesContext, String)}, * call {@link UIViewParameter#encodeAll} on each parameter. If * calling <code>getViewParameters()</code> causes * <code>UnsupportedOperationException</code> to be thrown, the * exception must be silently swallowed.</p> */ @Override public void encodeEnd(FacesContext context) throws IOException { super.encodeEnd(context); encodeViewParameters(context); notifyAfter(context, PhaseId.RENDER_RESPONSE); }
/** * <p class="changed_added_2_0"> If {@link #getAfterPhaseListener} * returns non-<code>null</code>, invoke it, passing a {@link * PhaseEvent} for the {@link PhaseId#RENDER_RESPONSE} phase. Any * errors that occur during invocation of the afterPhase listener * must be logged and swallowed. If the current view has view * parameters, as indicated by a non-empty and * non-<code>UnsupportedOperationException</code> throwing return * from {@link javax.faces.view.ViewDeclarationLanguage#getViewMetadata(javax.faces.context.FacesContext, String)}, * call {@link UIViewParameter#encodeAll} on each parameter. If * calling <code>getViewParameters()</code> causes * <code>UnsupportedOperationException</code> to be thrown, the * exception must be silently swallowed.</p> */ @Override public void encodeEnd(FacesContext context) throws IOException { super.encodeEnd(context); encodeViewParameters(context); notifyAfter(context, PhaseId.RENDER_RESPONSE); }
/** * <p class="changed_added_2_0"><span class="changed_modified_2_3">If</span> * {@link #getAfterPhaseListener} returns non-<code>null</code>, invoke it, passing a {@link * PhaseEvent} for the {@link PhaseId#RENDER_RESPONSE} phase. Any * {@code Exception}s that occur during invocation of the afterPhase listener * must be logged and swallowed, <span class="changed_added_2_3"> * unless the {@link #VIEWROOT_PHASE_LISTENER_QUEUES_EXCEPTIONS_PARAM_NAME} * parameter is set. In that case, the {@code Exception} must be passed to the * {@link javax.faces.context.ExceptionHandler} as well.</span>. If the * current view has view parameters, as indicated by a non-empty and * non-<code>UnsupportedOperationException</code> throwing return * from {@link javax.faces.view.ViewDeclarationLanguage#getViewMetadata(javax.faces.context.FacesContext, String)}, * call {@link UIViewParameter#encodeAll} on each parameter. If * calling <code>getViewParameters()</code> causes * <code>UnsupportedOperationException</code> to be thrown, the * exception must be silently swallowed.</p> */ @Override public void encodeEnd(FacesContext context) throws IOException { super.encodeEnd(context); encodeViewParameters(context); notifyAfter(context, PhaseId.RENDER_RESPONSE); }
/** * Recursive method that manage the opening and closure components. * Ex. : <li><ul><button/></ul></li> * Stop condition: cNew hasn't more children --> close Tag * @param cNew * @param context * @throws IOException */ public static void recursiveEncodechildren( final UIComponentBase cNew, final FacesContext context) throws IOException { if (cNew.getChildren() != null && !cNew.getChildren().isEmpty()) { for (Object o : cNew.getChildren()) { UIComponentBase c2 = (UIComponentBase) o; c2.encodeBegin(context); recursiveEncodechildren(c2, context); } //we travelled all children must therefore close the parent cNew.encodeEnd(context); } else { cNew.encodeEnd(context); } }
/** * @see javax.faces.component.UIComponentBase#encodeEnd(javax.faces.context.FacesContext) */ @Override public void encodeEnd(FacesContext context) throws IOException { try { setCachedFacesContext(context); setRowIndex(-1); } finally { setCachedFacesContext(null); } super.encodeEnd(context); }
@Override public void encodeChildren(final FacesContext context) throws IOException { if (logger.isDebugEnabled()) { logger.debug("Entered encodeChildren for class: " + this.getClass() ); } for (Object o : getChildren()) { UIComponentBase c = (UIComponentBase) o; c.encodeBegin(context); c.encodeChildren(context); c.encodeEnd(context); } if (logger.isDebugEnabled()) { logger.debug("Exited encodeChildren for class: " + this.getClass()); } }
public void encodeEnd(FacesContext context) throws IOException { super.encodeEnd(context); // prepare to save the tree state -- fix for MYFACES-618 // should be done in saveState() but Sun RI does not call saveState() and restoreState() // with javax.faces.STATE_SAVING_METHOD = server TreeState state = getDataModel().getTreeState(); if ( state == null) { // the model supplier has forgotten to return a valid state manager, but we need one state = new TreeStateBase(); } // save the state with the component, unless it should explicitly not saved eg. session-scoped model and state _restoredState = (state.isTransient()) ? null : state; }
@Override public void encodeChildren(final FacesContext context) throws IOException { if (logger.isDebugEnabled()) { logger.debug("Entered encodeChildren for class: " + this.getClass() ); } for (Object o : getChildren()) { UIComponentBase c = (UIComponentBase) o; c.encodeBegin(context); c.encodeChildren(context); c.encodeEnd(context); } if (logger.isDebugEnabled()) { logger.debug("Exited encodeChildren for class: " + this.getClass()); } }
/** * If this component is rendered, then end the <code><script></code> element. */ @Override public void encodeEnd(FacesContext context) throws IOException { if (getRendererType() != null) { super.encodeEnd(context); return; } if (isRendered()) { context.getResponseWriter().endElement("script"); } popComponentFromEL(context); }
/** * If this component is rendered, then end the <code><script></code> element. */ @Override public void encodeEnd(FacesContext context) throws IOException { if (getRendererType() != null) { super.encodeEnd(context); return; } if (isRendered()) { context.getResponseWriter().endElement("script"); } popComponentFromEL(context); }
@Override public void encodeEnd(FacesContext facesContext) throws IOException { if (isRendered()) { StateHelper state = getStateHelper(); String message = (String) state.eval(PropertyKeys.message); String context = (String) state.eval(PropertyKeys.context); String plural = (String) state.eval(PropertyKeys.plural); Long num = (Long) state.eval(PropertyKeys.num); if (message == null) { throw new FacesException("Message id is null"); } if (plural != null && num == null) { throw new FacesException("Message id '" + message + "' requires num parameter"); } Object[] params = getParameters(); ResourceBundle bundle = getResourceBundle(facesContext); String str = I18N.translate(bundle, context, message, plural, num == null ? 0L : num.longValue(), params); facesContext.getResponseWriter().writeText(str, null); } super.encodeEnd(facesContext); }