Package javax.faces.application

Examples of javax.faces.application.Application.publishEvent()


            return;
        }

        pushComponentToEL(faces, this);
        Application app = faces.getApplication();
        app.publishEvent(faces, PreValidateEvent.class, this);
        preValidate(faces);
        processValidatesChildren(faces);
        app.publishEvent(faces, PostValidateEvent.class, this);
        popComponentFromEL(faces);
    }
View Full Code Here


        pushComponentToEL(faces, this);
        Application app = faces.getApplication();
        app.publishEvent(faces, PreValidateEvent.class, this);
        preValidate(faces);
        processValidatesChildren(faces);
        app.publishEvent(faces, PostValidateEvent.class, this);
        popComponentFromEL(faces);
    }

    public void processUpdates(FacesContext faces) {
        if (!this.isRendered()) {
View Full Code Here

            return;
        }

        pushComponentToEL(facesContext, null);
        Application app = facesContext.getApplication();
        app.publishEvent(facesContext, PreValidateEvent.class, this);

        final String activeItem = getActiveItemValue();
        EnumSet<VisitHint> hints = EnumSet.of(VisitHint.SKIP_UNRENDERED);
        VisitContext visitContext = new FullVisitContext(facesContext, hints);
        this.visitTree(visitContext, new VisitCallback() {
View Full Code Here

                }
                return VisitResult.REJECT; // No need to visit target's children, as they were recursively visited above
            }
        });

        app.publishEvent(facesContext, PostValidateEvent.class, this);
        popComponentFromEL(facesContext);
    }

    /**
     * <p>
 
View Full Code Here

                }
               
                // publish a PreRenderViewEvent: note that the event listeners
                // of this event can change the view, so we have to perform the algorithm
                // until the viewId does not change when publishing this event.
                application.publishEvent(facesContext, PreRenderViewEvent.class, root);
               
                // was the response marked as complete by an event listener?
                if (facesContext.getResponseComplete())
                {
                    return false;
View Full Code Here

               
                // JSF 2.0 Publish PostConstructApplicationEvent after all configuration resources
                // has been parsed and processed
                FacesContext facesContext = FacesContext.getCurrentInstance();
                Application application = facesContext.getApplication();
                application.publishEvent(facesContext, PostConstructApplicationEvent.class, Application.class, application);
            }
        }
    }

    private void purgeConfiguration() throws NoSuchMethodException, IllegalAccessException, InvocationTargetException
View Full Code Here

           
            // Store the new UIViewRoot instance in the FacesContext.
            facesContext.setViewRoot(viewRoot);
           
            // Publish an AfterAddToParent event with the created UIViewRoot as the event source.
            application.publishEvent(facesContext, PostAddToViewEvent.class, viewRoot);
        }

        // add the ErrorPageBean to the view map to fully support
        // facelet error pages, if we are in ProjectStage Development
        // and currently generating an error page
View Full Code Here

   * Executes validation logic.
   */
  private void _executeValidate(FacesContext context)
  {
    Application application = context.getApplication();
    application.publishEvent(context, PreValidateEvent.class, UIComponent.class, this);
    try
    {
      validate(context);
    }
    catch (RuntimeException e)
View Full Code Here

      context.renderResponse();
      throw e;
    }
    finally
    {
      application.publishEvent(context, PostValidateEvent.class, UIComponent.class, this);
    }

    if (!isValid())
    {
      context.renderResponse();
View Full Code Here

     */
    private void _dispatchApplicationEvent(ServletContext servletContext, Class<? extends SystemEvent> eventClass)
    {
        FacesContext facesContext = FacesContext.getCurrentInstance();
        Application application = facesContext.getApplication();
        application.publishEvent(facesContext, eventClass, Application.class, application);
    }
   
    /**
     * Cleans up all remaining resources (well, theoretically).
     */
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.