/** * @see javax.faces.component.UIComponent#unsubscribeFromEvent(java.lang.Class, javax.faces.event.ComponentSystemEventListener) */ @Override public void unsubscribeFromEvent(Class<? extends SystemEvent> eventClass, ComponentSystemEventListener componentListener) { parent.unsubscribeFromEvent(eventClass, componentListener); }
/** * @see javax.faces.component.UIComponent#unsubscribeFromEvent(java.lang.Class, javax.faces.event.ComponentSystemEventListener) */ @Override public void unsubscribeFromEvent(Class<? extends SystemEvent> eventClass, ComponentSystemEventListener componentListener) { parent.unsubscribeFromEvent(eventClass, componentListener); }
public void unsubscribeFromEvent(Class<? extends SystemEvent> eventClass, ComponentSystemEventListener componentListener) { _delegate.unsubscribeFromEvent(eventClass, componentListener); }
/** * @see javax.faces.component.UIComponent#unsubscribeFromEvent(java.lang.Class, javax.faces.event.ComponentSystemEventListener) */ public void unsubscribeFromEvent(Class<? extends SystemEvent> eventClass, ComponentSystemEventListener componentListener) { parent.unsubscribeFromEvent(eventClass, componentListener); }
public void unsubscribeFromEvent(Class<? extends SystemEvent> eventClass, ComponentSystemEventListener componentListener) { _delegate.unsubscribeFromEvent(eventClass, componentListener); }
public void unsubscribeFromEvent(Class<? extends SystemEvent> eventClass, ComponentSystemEventListener componentListener) { _delegate.unsubscribeFromEvent(eventClass, componentListener); }
/** * @see javax.faces.component.UIComponent#unsubscribeFromEvent(java.lang.Class, javax.faces.event.ComponentSystemEventListener) */ @Override public void unsubscribeFromEvent(Class<? extends SystemEvent> eventClass, ComponentSystemEventListener componentListener) { parent.unsubscribeFromEvent(eventClass, componentListener); }
/** * Unsubscribe the given event listener on the given event from the given component. Normally, you would use * {@link UIComponent#unsubscribeFromEvent(Class, ComponentSystemEventListener)} for this, but this wouldn't work * when executed inside {@link ComponentSystemEventListener#processEvent(javax.faces.event.ComponentSystemEvent)}, * as it would otherwise end up in a <code>ConcurrentModificationException</code> while JSF is iterating over all * system event listeners. The trick is to perform the unsubscribe during the after phase of the current request * phase {@link #subscribeToRequestAfterPhase(PhaseId, org.omnifaces.util.Callback.Void)}. * @param component The component to unsubscribe the given event listener from. * @param event The event associated with the given event listener. * @param listener The event listener to be unsubscribed from the given component. * @throws IllegalStateException When this method is invoked during render response phase, because it would be too * late to remove it from the view state. * @since 2.1 * @see #subscribeToRequestAfterPhase(PhaseId, org.omnifaces.util.Callback.Void) * @see UIComponent#unsubscribeFromEvent(Class, ComponentSystemEventListener) */ public static void unsubscribeFromComponentEvent (UIComponent component, Class<? extends SystemEvent> event, ComponentSystemEventListener listener) { PhaseId currentPhaseId = getCurrentPhaseId(); if (currentPhaseId == PhaseId.RENDER_RESPONSE) { throw new IllegalStateException(ERROR_UNSUBSCRIBE_TOO_LATE); } subscribeToRequestAfterPhase(currentPhaseId, () -> component.unsubscribeFromEvent(event, listener)); }
/** * Unsubscribe the given event listener on the given event from the given component. Normally, you would use * {@link UIComponent#unsubscribeFromEvent(Class, ComponentSystemEventListener)} for this, but this wouldn't work * when executed inside {@link ComponentSystemEventListener#processEvent(javax.faces.event.ComponentSystemEvent)}, * as it would otherwise end up in a <code>ConcurrentModificationException</code> while JSF is iterating over all * system event listeners. The trick is to perform the unsubscribe during the after phase of the current request * phase {@link #subscribeToRequestAfterPhase(PhaseId, org.omnifaces.util.Callback.Void)}. * @param component The component to unsubscribe the given event listener from. * @param event The event associated with the given event listener. * @param listener The event listener to be unsubscribed from the given component. * @throws IllegalStateException When this method is invoked during render response phase, because it would be too * late to remove it from the view state. * @since 2.1 * @see #subscribeToRequestAfterPhase(PhaseId, org.omnifaces.util.Callback.Void) * @see UIComponent#unsubscribeFromEvent(Class, ComponentSystemEventListener) */ public static void unsubscribeFromComponentEvent (UIComponent component, Class<? extends SystemEvent> event, ComponentSystemEventListener listener) { PhaseId currentPhaseId = getCurrentPhaseId(); if (currentPhaseId == PhaseId.RENDER_RESPONSE) { throw new IllegalStateException(ERROR_UNSUBSCRIBE_TOO_LATE); } subscribeToRequestAfterPhase(currentPhaseId, () -> component.unsubscribeFromEvent(event, listener)); }
@Override public void processEvent(ComponentSystemEvent event) throws AbortProcessingException { ccME.ccClientId = event.getComponent().getClientId(); event.getComponent().unsubscribeFromEvent(PostAddToViewEvent.class, this); } }
@Override public void processEvent(ComponentSystemEvent event) throws AbortProcessingException { ccME.ccClientId = event.getComponent().getClientId(); event.getComponent().unsubscribeFromEvent(PostAddToViewEvent.class, this); } }
@Override public void processEvent(ComponentSystemEvent event) throws AbortProcessingException { ccME.ccClientId = event.getComponent().getClientId(); event.getComponent().unsubscribeFromEvent(PostAddToViewEvent.class, this); } }
@Override public void processEvent(ComponentSystemEvent event) throws AbortProcessingException { ccME.ccClientId = event.getComponent().getClientId(); event.getComponent().unsubscribeFromEvent(PostAddToViewEvent.class, this); } }