Package com.sun.faces.config

Examples of com.sun.faces.config.WebConfiguration


            byte[] b = new byte[128];
            if (is.read(b) > 0) {
                String r = new String(b, encoding);
                Matcher m = XmlDeclaration.matcher(r);
                if (m.find()) {
                    WebConfiguration config = mngr.getWebConfiguration();
                    FaceletsConfiguration faceletsConfig = config.getFaceletsConfiguration();
                    boolean currentModeIsXhtml = faceletsConfig.isProcessCurrentDocumentAsFaceletsXhtml(mngr.getAlias());

                    // We want to write the XML declaration if and only if
                    // the file extension for the current file has a mapping
                    // with the value of XHTML
View Full Code Here


        propertyResolver = new PropertyResolverImpl();
        variableResolver = new VariableResolverImpl();
        elResolvers = new CompositeELResolver();

        FacesContext ctx = FacesContext.getCurrentInstance();
        WebConfiguration webConfig = WebConfiguration.getInstance(ctx.getExternalContext());
        passDefaultTimeZone = webConfig.isOptionEnabled(DateTimeConverterUsesSystemTimezone);
        registerPropertyEditors = webConfig.isOptionEnabled(RegisterConverterPropertyEditors);
        if (passDefaultTimeZone) {
            systemTimeZone = TimeZone.getDefault();
        }
        if (LOGGER.isLoggable(Level.FINE)) {
            LOGGER.log(Level.FINE, "Created Application instance ");
View Full Code Here

     */
    @Override
    public ProjectStage getProjectStage() {
       
        if (projectStage == null) {
            WebConfiguration webConfig =
                  WebConfiguration.getInstance(
                        FacesContext.getCurrentInstance().getExternalContext());
            String value = webConfig.getEnvironmentEntry(WebConfiguration.WebEnvironmentEntry.ProjectStage);
            if (value != null) {
                if (LOGGER.isLoggable(Level.FINE)) {
                    LOGGER.log(Level.FINE,
                               "ProjectStage configured via JNDI: {0}",
                               value);
                }
            } else {
                value = webConfig.getOptionValue(WebContextInitParameter.JavaxFacesProjectStage);
                if (value != null) {
                    if (LOGGER.isLoggable(Level.FINE)) {
                        LOGGER.log(Level.FINE,
                               "ProjectStage configured via servlet context init parameter: {0}",
                               value);
View Full Code Here

        Map<String, Object> appMap = externalContext.getApplicationMap();
        appMap.put(ASSOCIATE_KEY, this);
        //noinspection CollectionWithoutInitialCapacity
        navigationMap = new ConcurrentHashMap<String, Set<NavigationCase>>();
        injectionProvider = (InjectionProvider) ctx.getAttributes().get(ConfigManager.INJECTION_PROVIDER_KEY);
        WebConfiguration webConfig = WebConfiguration.getInstance(externalContext);
        beanManager = new BeanManager(injectionProvider,
                                      webConfig.isOptionEnabled(
                                           EnableLazyBeanValidation));
        // install the bean manager as a system event listener for custom
        // scopes being destoryed.
        app.subscribeToEvent(PreDestroyCustomScopeEvent.class,
                             ScopeContext.class,
                             beanManager);
        annotationManager = new AnnotationManager();

        groovyHelper = GroovyHelper.getCurrentInstance();

        devModeEnabled = (appImpl.getProjectStage() == ProjectStage.Development);
        // initialize Facelets
        if (!webConfig.isOptionEnabled(DisableFaceletJSFViewHandler)) {
            compiler = createCompiler(appMap, webConfig);
            faceletFactory = createFaceletFactory(compiler, webConfig);
        }

        if (!devModeEnabled) {
View Full Code Here

     * @return The provider class name specified in the container configuration,
     *         or <code>null</code> if not found.
     */
    private static String findProviderClass(ExternalContext extContext) {
       
        WebConfiguration webConfig = WebConfiguration.getInstance(extContext);
       
        String provider = webConfig.getContextInitParameter(WebContextInitParameter.InjectionProviderClass);
       
        if (provider != null) {
            return provider;
        } else {
            provider = System.getProperty(INJECTION_PROVIDER_PROPERTY);
View Full Code Here

     * <p>Perform the necessary intialization to make this
     * class work.</p>   
     */
    private void init() {
       
        WebConfiguration webConfig = WebConfiguration.getInstance();
        assert(webConfig != null);
       
        String pass = webConfig.getEnvironmentEntry(
                        WebEnvironmentEntry.ClientStateSavingPassword);
        if (pass != null) {
            guard = new ByteArrayGuard(pass);
        }
        compressState = webConfig.getBooleanContextInitParameter(
                            BooleanWebContextInitParameter.CompressViewState);
        String size = webConfig.getContextInitParameter(
                         WebContextInitParameter.ClientStateWriteBufferSize);
        String defaultSize =
              WebContextInitParameter.ClientStateWriteBufferSize.getDefaultValue();
        try {
            csBuffSize = Integer.parseInt(size);
View Full Code Here

     * @return The provider class name specified in the container configuration,
     *         or <code>null</code> if not found.
     */
    private static String findProviderClass(ExternalContext extContext) {
       
        WebConfiguration webConfig = WebConfiguration.getInstance(extContext);
       
        String provider = webConfig.getContextInitParameter(
              WebContextInitParameter.SerializationProviderClass);
       
        if (provider != null) {
            return provider;
        } else {
View Full Code Here

        protected int getNumberOfViewsInLogicalViewParameter(FacesContext context) {

            if (noOfViewsInLogicalView != 0) {
                return noOfViewsInLogicalView;
            }
            WebConfiguration webConfig =
                  WebConfiguration.getInstance(context.getExternalContext());
            String noOfViewsStr = webConfig
                  .getContextInitParameter(WebContextInitParameter.NumberOfLogicalViews);
            String defaultValue =
                  WebContextInitParameter.NumberOfLogicalViews.getDefaultValue();
            try {
                noOfViewsInLogicalView = Integer.valueOf(noOfViewsStr);
View Full Code Here

        protected int getNumberOfViewsParameter(FacesContext context) {
       
            if (noOfViews != 0) {
                return noOfViews;
            }
            WebConfiguration webConfig =
                  WebConfiguration.getInstance(context.getExternalContext());
            String noOfViewsStr = webConfig
                  .getContextInitParameter(WebContextInitParameter.NumberOfViews);
            String defaultValue =
                  WebContextInitParameter.NumberOfViews.getDefaultValue();
            try {
                noOfViews = Integer.valueOf(noOfViewsStr);
View Full Code Here

     * @throws java.io.IOException if an error occurs writing to the response
     */
    public static void renderFormInitScript(ResponseWriter writer,
                                            FacesContext context)
          throws IOException {
        WebConfiguration webConfig =
              WebConfiguration.getInstance(context.getExternalContext());

        if (webConfig
              .getBooleanContextInitParameter(BooleanWebContextInitParameter.ExternalizeJavaScript)) {
            // PENDING
            // We need to look into how to make this work in a portlet environment.
            // For the time being, this feature will need to be disabled when running
            // in a portlet.
View Full Code Here

TOP

Related Classes of com.sun.faces.config.WebConfiguration

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.