Package com.sun.faces.config

Examples of com.sun.faces.config.WebConfiguration


        this.init();
       
    }

    private void init() {
        WebConfiguration webconfig = WebConfiguration.getInstance();
        enableMissingResourceLibraryDetection =
                webconfig.isOptionEnabled(EnableMissingResourceLibraryDetection);
    }
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

    protected boolean namespaceParameters;

    // ---------------------------------------------------------- Public Methods

    public OutputLinkRenderer() {
        WebConfiguration webConfig = WebConfiguration.getInstance();
        namespaceParameters = webConfig.isOptionEnabled(BooleanWebContextInitParameter.NamespaceParameters);
    }
View Full Code Here

    // <editor-fold defaultstate="collapsed" desc="Constructors and instance accessors">

    /** Creates a new instance of ELFlash */
    private ELFlash() {
        flashInnerMap = new ConcurrentHashMap<String,Map<String, Object>>();
        WebConfiguration config = WebConfiguration.getInstance();
        String value;
        try {
            value = config.getOptionValue(WebContextInitParameter.NumberOfConcurrentFlashUsers);
            numberOfConcurentFlashUsers = Integer.parseInt(value);
        } catch (NumberFormatException nfe) {
      if (LOGGER.isLoggable(Level.WARNING)) {
    LOGGER.log(Level.WARNING, "Unable to set number of concurrent flash users.  Defaulting to {0}", numberOfConcurentFlashUsers);
      }

        }

        try {
            value = config.getOptionValue(WebContextInitParameter.NumberOfFlashesBetweenFlashReapings);
            numberOfFlashesBetweenFlashReapings = Long.parseLong(value);
        } catch (NumberFormatException nfe) {
      if (LOGGER.isLoggable(Level.WARNING)) {
    LOGGER.log(Level.WARNING, "Unable to set number flashes between flash repaings.  Defaulting to {0}", numberOfFlashesBetweenFlashReapings);
      }
View Full Code Here

    // ------------------------------------------------------------ Constructors


    public FormRenderer() {
        WebConfiguration webConfig = WebConfiguration.getInstance();
        writeStateAtEnd =
             webConfig.getBooleanContextInitParameter(
                  BooleanWebContextInitParameter.WriteStateAtFormEnd);

    }
View Full Code Here

                renderFactory.getRenderKit(context, viewToRender.getRenderKitId());
               
        ResponseWriter oldWriter = context.getResponseWriter();

        if (bufSize == -1) {
            WebConfiguration webConfig =
                  WebConfiguration
                        .getInstance(context.getExternalContext());
            try {
                bufSize = Integer
                      .parseInt(webConfig.getContextInitParameter(
                            WebContextInitParameter.ResponseBufferSize));
            } catch (NumberFormatException nfe) {
                bufSize = Integer
                      .parseInt(WebContextInitParameter.ResponseBufferSize.getDefaultValue());
            }
View Full Code Here

        private synchronized void loadFlows(FacesContext context, FlowHandler flowHandler) throws IOException {
            javax.enterprise.inject.spi.BeanManager beanManager = (javax.enterprise.inject.spi.BeanManager)
                    Util.getCDIBeanManager(context.getExternalContext().getApplicationMap());
            FlowDiscoveryCDIContext flowDiscoveryContext = (FlowDiscoveryCDIContext) beanManager.getContext(FlowDefinition.class);
            List<Producer<Flow>> flowProducers = flowDiscoveryContext.getFlowProducers();
            WebConfiguration config = WebConfiguration.getInstance();
            if (!flowProducers.isEmpty()) {
                enableClientWindowModeIfNecessary(context);
            }
           
            for (Producer<Flow> cur : flowProducers) {
                Flow toAdd = cur.produce(beanManager.<Flow>createCreationalContext(null));
                if (null == toAdd) {
                    LOGGER.log(Level.SEVERE, "Flow producer method {0}() returned null.  Ignoring.",
                            new String [] { cur.toString() });
                } else {
                    flowHandler.addFlow(context, toAdd);
                    config.setHasFlows(true);
                }
            }
           
        }
View Full Code Here

        }
   
   
        private void enableClientWindowModeIfNecessary(FacesContext context) {

            WebConfiguration config = WebConfiguration.getInstance(context.getExternalContext());
           
            String optionValue = config.getOptionValue(WebConfiguration.WebContextInitParameter.ClientWindowMode);
            boolean clientWindowNeedsEnabling = false;
            if ("none".equals(optionValue)) {
                clientWindowNeedsEnabling = true;
                String featureName =
                        WebConfiguration.WebContextInitParameter.ClientWindowMode.getQualifiedName();
                LOGGER.log(Level.WARNING,
                        "{0} was set to none, but Faces Flows requires {0} is enabled.  Setting to ''url''.", new Object[]{featureName});
            } else if (null == optionValue) {
                clientWindowNeedsEnabling = true;
            }
            if (clientWindowNeedsEnabling) {
                config.setOptionValue(WebConfiguration.WebContextInitParameter.ClientWindowMode, "url");
            }
        }
View Full Code Here

                                          Set<String> componentIds) {

        boolean uniquenessCheckDisabled = false;
       
        if (context.isProjectStage(ProjectStage.Production)) {
            WebConfiguration config = WebConfiguration.getInstance(context.getExternalContext());
            uniquenessCheckDisabled = config.isOptionEnabled(
                WebConfiguration.BooleanWebContextInitParameter.DisableIdUniquenessCheck);
        }
       
        if (!uniquenessCheckDisabled) {
       
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.