Package javax.faces.application

Examples of javax.faces.application.ProjectStage


      debug = config.getServletContext().getInitParameter(DEBUG_INIT_PARAM);
    }

    // private call to get the used JSF 2.0 ProjectStage as we don't have
    // access to the FacesContext object here...
    ProjectStage currentStage = _getFacesProjectStage(config.getServletContext());

    if (debug != null)
    {
      _debug = "true".equalsIgnoreCase(debug)
    }
View Full Code Here


            // print out a very prominent log message if the project stage is != Production
            if (!facesContext.isProjectStage(ProjectStage.Production) &&
                !facesContext.isProjectStage(ProjectStage.UnitTest))
            {
                ProjectStage projectStage = facesContext.getApplication().getProjectStage();
                StringBuilder message = new StringBuilder("\n\n");
                message.append("*******************************************************************\n");
                message.append("*** WARNING: Apache MyFaces-2 is running in ");
                message.append(projectStage.name().toUpperCase());       
                message.append(" mode.");
                int length = projectStage.name().length();
                for (int i = 0; i < 11 - length; i++)
                {
                    message.append(" ");
                }
                message.append("   ***\n");
 
View Full Code Here

      final Result result;
      Project project = getSelectedProject(context.getUIContext());
      FacesFacet facesFacet = project.getFacet(FacesFacet.class);
      if (stage.hasValue())
      {
         ProjectStage projectStage = stage.getValue();
         facesFacet.setProjectStage(projectStage);
         result = Results.success("Faces PROJECT_STAGE updated to: " + projectStage);
      }
      else
      {
View Full Code Here

        if (localePrefix != null) {
            uri += ((queryStarted) ? "&loc=" : "?loc=") + localePrefix;
            queryStarted = true;
        }
        if ("jsf.js".equals(getResourceName()) && "javax.faces".equals(getLibraryName())) {
            ProjectStage stage = context.getApplication().getProjectStage();
            String stageStr = stage.toString();
            switch (stage) {
                case Development:
                    uri += ((queryStarted) ? "&stage=Development" : "?stage=Development" );
                    break;
                case SystemTest:
                    uri += ((queryStarted) ? "&stage=SystemTest" : "?stage=SystemTest" );
                    break;
                case UnitTest:
                    uri += ((queryStarted) ? "&stage=UnitTest" : "?stage=UnitTest" );
                    break;
                default:
                    assert(stage.equals(ProjectStage.Production));
            }
        }

        uri = context.getApplication().getViewHandler()
              .getResourceURL(context,
View Full Code Here

        if (localePrefix != null) {
            uri += ((queryStarted) ? "&loc=" : "?loc=") + localePrefix;
            queryStarted = true;
        }
        if ("jsf.js".equals(getResourceName()) && "javax.faces".equals(getLibraryName())) {
            ProjectStage stage = context.getApplication().getProjectStage();
            switch (stage) {
                case Development:
                    uri += ((queryStarted) ? "&stage=Development" : "?stage=Development" );
                    break;
                case SystemTest:
                    uri += ((queryStarted) ? "&stage=SystemTest" : "?stage=SystemTest" );
                    break;
                case UnitTest:
                    uri += ((queryStarted) ? "&stage=UnitTest" : "?stage=UnitTest" );
                    break;
                default:
                    assert(stage.equals(ProjectStage.Production));
            }
        }

        uri = context.getApplication().getViewHandler()
              .getResourceURL(context,
View Full Code Here

         * Warn the user if the ALT attribute is missing.
         */               
        if (uiComponent.getAttributes().get(HTML.ALT_ATTR) == null)
        {
            //we don't want to flood logs with warnings in production and system test environments
            ProjectStage projectStage = facesContext.getApplication().getProjectStage();
            if(projectStage.equals(ProjectStage.Development) || projectStage.equals(ProjectStage.UnitTest))
                log.warning("ALT attribute is missing for : " + uiComponent.getId());
        }

        if (uiComponent instanceof ClientBehaviorHolder && JavascriptUtils.isJavascriptAllowed(facesContext.getExternalContext()))
        {
View Full Code Here

            _dispatchApplicationEvent(servletContext, PostConstructApplicationEvent.class);
           
            // print out a very prominent log message if the project stage is != Production
            if (!facesContext.isProjectStage(ProjectStage.Production))
            {
                ProjectStage projectStage = facesContext.getApplication().getProjectStage();
                StringBuilder message = new StringBuilder("\n\n");
                message.append("*******************************************************************\n");
                message.append("*** WARNING: Apache MyFaces-2 is running in ");
                message.append(projectStage.name().toUpperCase());       
                message.append(" mode.");
                int length = projectStage.name().length();
                for (int i = 0; i < 11 - length; i++)
                {
                    message.append(" ");
                }
                message.append("   ***\n");
 
View Full Code Here

            // print out a very prominent log message if the project stage is != Production
            if (!facesContext.isProjectStage(ProjectStage.Production) &&
                !facesContext.isProjectStage(ProjectStage.UnitTest))
            {
                ProjectStage projectStage = facesContext.getApplication().getProjectStage();
                StringBuilder message = new StringBuilder("\n\n");
                message.append("*******************************************************************\n");
                message.append("*** WARNING: Apache MyFaces-2 is running in ");
                message.append(projectStage.name().toUpperCase());       
                message.append(" mode.");
                int length = projectStage.name().length();
                for (int i = 0; i < 11 - length; i++)
                {
                    message.append(" ");
                }
                message.append("   ***\n");
 
View Full Code Here

         * Warn the user if the ALT attribute is missing.
         */               
        if (uiComponent.getAttributes().get(HTML.ALT_ATTR) == null)
        {
            //we don't want to flood logs with warnings in production and system test environments
            ProjectStage projectStage = facesContext.getApplication().getProjectStage();
            if(projectStage.equals(ProjectStage.Development) || projectStage.equals(ProjectStage.UnitTest))
                log.warning("ALT attribute is missing for : " + uiComponent.getId());
        }

        if (uiComponent instanceof ClientBehaviorHolder && JavascriptUtils.isJavascriptAllowed(facesContext.getExternalContext()))
        {
View Full Code Here

            // print out a very prominent log message if the project stage is != Production
            if (!facesContext.isProjectStage(ProjectStage.Production) &&
                !facesContext.isProjectStage(ProjectStage.UnitTest))
            {
                ProjectStage projectStage = facesContext.getApplication().getProjectStage();
                StringBuilder message = new StringBuilder("\n\n");
                message.append("*******************************************************************\n");
                message.append("*** WARNING: Apache MyFaces-2 is running in ");
                message.append(projectStage.name().toUpperCase());       
                message.append(" mode.");
                int length = projectStage.name().length();
                for (int i = 0; i < 11 - length; i++)
                {
                    message.append(" ");
                }
                message.append("   ***\n");
 
View Full Code Here

TOP

Related Classes of javax.faces.application.ProjectStage

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.