Package org.ajax4jsf.event

Examples of org.ajax4jsf.event.EventsQueue


  public void clearEvents() {
    int len;
    events = new EventsQueue[len = PhaseId.VALUES.size()];
    for (int i = 0; i < len; i++) {
      events[i] = new EventsQueue();
    }
  }
View Full Code Here


   * @param phaseId -
   *            phase, for which events must be processed.
   */
  void broadcastEventsForPhase(FacesContext context, PhaseId phaseId) {
    EventsQueue[] events = getEvents();
    EventsQueue anyPhaseEvents = events[PhaseId.ANY_PHASE.getOrdinal()];
    EventsQueue phaseEvents = events[phaseId.getOrdinal()];
    if (phaseEvents.isEmpty() && anyPhaseEvents.isEmpty())
      return;
    // FacesEvent event = null;
    boolean haveAnyPhaseEvents = !anyPhaseEvents.isEmpty();
    boolean havePhaseEvents = !phaseEvents.isEmpty();
    do {
      // ANY_PHASE first
      processEvents(context, anyPhaseEvents, haveAnyPhaseEvents);

      processEvents(context, phaseEvents, havePhaseEvents);
      // Events can queued in other events processing
      haveAnyPhaseEvents = !anyPhaseEvents.isEmpty();
      havePhaseEvents = !phaseEvents.isEmpty();
    } while (haveAnyPhaseEvents || havePhaseEvents);
    if (context.getRenderResponse() || context.getResponseComplete()) {
      clearEvents();
    }

View Full Code Here

      }
    }
  }

  public void broadcastAjaxEvents(FacesContext context) {
    EventsQueue queue = getAjaxEventsQueue();
    processEvents(context, queue, !queue.isEmpty());
  }
View Full Code Here

  public void clearEvents() {
    int len;
    events = new EventsQueue[len = PhaseId.VALUES.size()];
    for (int i = 0; i < len; i++) {
      events[i] = new EventsQueue();
    }
  }
View Full Code Here

   * @param phaseId -
   *            phase, for which events must be processed.
   */
  void broadcastEvents(FacesContext context, PhaseId phaseId) {
    EventsQueue[] events = getEvents();
    EventsQueue anyPhaseEvents = events[PhaseId.ANY_PHASE.getOrdinal()];
    EventsQueue phaseEvents = events[phaseId.getOrdinal()];
    if (phaseEvents.isEmpty() && anyPhaseEvents.isEmpty())
      return;
    // FacesEvent event = null;
    boolean haveAnyPhaseEvents = !anyPhaseEvents.isEmpty();
    boolean havePhaseEvents = !phaseEvents.isEmpty();
    do {
      // ANY_PHASE first
      processEvents(context, anyPhaseEvents, haveAnyPhaseEvents);

      processEvents(context, phaseEvents, havePhaseEvents);
      // Events can queued in other events processing
      haveAnyPhaseEvents = !anyPhaseEvents.isEmpty();
      havePhaseEvents = !phaseEvents.isEmpty();
    } while (haveAnyPhaseEvents || havePhaseEvents);
    if (context.getRenderResponse() || context.getResponseComplete()) {
      clearEvents();
    }

View Full Code Here

      }
    }
  }

  public void broadcastAjaxEvents(FacesContext context) {
    EventsQueue queue = getAjaxEventsQueue();
    processEvents(context, queue, !queue.isEmpty());
  }
View Full Code Here

  public void clearEvents() {
    int len;
    events = new EventsQueue[len = PhaseId.VALUES.size()];
    for (int i = 0; i < len; i++) {
      events[i] = new EventsQueue();
    }
  }
View Full Code Here

TOP

Related Classes of org.ajax4jsf.event.EventsQueue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.