Package javax.faces.event

Examples of javax.faces.event.SystemEvent


            return;
        }
       
        try
        {
            SystemEvent event = null;
            if (source instanceof SystemEventListenerHolder)
            {
                SystemEventListenerHolder holder = (SystemEventListenerHolder) source;

                // If the source argument implements SystemEventListenerHolder, call
View Full Code Here


            sourceBaseType = source.getClass();
        }
       
        try
        {
            SystemEvent event = null;
            if (source instanceof SystemEventListenerHolder)
            {
                SystemEventListenerHolder holder = (SystemEventListenerHolder) source;

                // If the source argument implements SystemEventListenerHolder, call
View Full Code Here

  }

  @Test
  public void shouldCapturePreRenderComponentEvent() throws Exception {
    UIComponent component = mock(UIComponent.class);
    SystemEvent event = new PreRenderComponentEvent(component);
    this.listener.processEvent(event);
    assertThat(MvcNavigationSystemEventListener.getLastPreRenderComponentEvent(this.context),
        is(sameInstance(event)));
  }
View Full Code Here

  }

  @Test
  public void shouldNotCaptureOtherEvent() throws Exception {
    UIComponent component = mock(UIComponent.class);
    SystemEvent event = new PreRemoveFromViewEvent(component);
    this.listener.processEvent(event);
    assertThat(MvcNavigationSystemEventListener.getLastPreRenderComponentEvent(this.context), is(nullValue()));
  }
View Full Code Here

            sourceBaseType = source.getClass();
        }
       
        try
        {
            SystemEvent event = null;
            if (source instanceof SystemEventListenerHolder)
            {
                SystemEventListenerHolder holder = (SystemEventListenerHolder) source;

                // If the source argument implements SystemEventListenerHolder, call
View Full Code Here

        try {
            // The side-effect of calling invokeListenersFor
            // will create a SystemEvent object appropriate to event/source
            // combination.  This event will be passed on subsequent invocations
            // of invokeListenersFor
            SystemEvent event;

            // Look for and invoke any listeners stored on the source instance.
            event = invokeComponentListenersFor(systemEventClass, source);

            // Look for and invoke any 'view' listeners
View Full Code Here

    private SystemEvent invokeViewListenersFor(FacesContext ctx,
                                               Class<? extends SystemEvent> systemEventClass,
                                               SystemEvent event,
                                               Object source) {
        SystemEvent result = event;

        if (listenerInvocationGuard.isGuardSet(ctx, systemEventClass)) {
            return result;
        }
        listenerInvocationGuard.setGuard(ctx, systemEventClass);
View Full Code Here

        try {
            // The side-effect of calling invokeListenersFor
            // will create a SystemEvent object appropriate to event/source
            // combination.  This event will be passed on subsequent invocations
            // of invokeListenersFor
            SystemEvent event;

            // Look for and invoke any listeners stored on the source instance.
            event = invokeComponentListenersFor(systemEventClass, source);

            // Look for and invoke any 'view' listeners
View Full Code Here

    private SystemEvent invokeViewListenersFor(FacesContext ctx,
                                               Class<? extends SystemEvent> systemEventClass,
                                               SystemEvent event,
                                               Object source) {
        SystemEvent result = event;

        if (listenerInvocationGuard.isGuardSet(ctx, systemEventClass)) {
            return result;
        }
        listenerInvocationGuard.setGuard(ctx, systemEventClass);
View Full Code Here

  // Loop through the tasks and execute them...
  for (Task task : getTasks()) {
// FIXME: This implementation is a no-op, it just loops through the tasks and fires the TASK_COMPLETE event.
// FIXME: A real implementation would aggregate & dispatch the tasks and register listeners with the "backend dispatcher" which would fire the TASK_COMPLETE event.
// FIXME: This method should not block.
      SystemEvent event = new TaskEvent(task);
      List<SystemEventListener> listeners = task.getListeners(TaskEvent.TASK_COMPLETE);
      if (listeners != null) {
    for (SystemEventListener listener : listeners) {
        listener.processEvent(event);
    }
View Full Code Here

TOP

Related Classes of javax.faces.event.SystemEvent

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.