private boolean isUseFlashScopePurgeViewsInSession(ExternalContext externalContext) { if (_useFlashScopePurgeViewsInSession == null) { _useFlashScopePurgeViewsInSession = WebConfigParamUtils.getBooleanInitParameter( externalContext, USE_FLASH_SCOPE_PURGE_VIEWS_IN_SESSION, false); } return _useFlashScopePurgeViewsInSession; }
/** * Gets the boolean init parameter value from the specified context. If the parameter was not specified, the default * value is used instead. * * @param context * the application's external context * @param names * the init parameter's names * * @return the init parameter value as a boolean * * @throws NullPointerException * if context or name is <code>null</code> */ public static boolean getBooleanInitParameter(ExternalContext context, String[] names) { return getBooleanInitParameter(context, names, false); }
/** * Gets the boolean init parameter value from the specified context. If the parameter was not specified, the default * value is used instead. * * @param context * the application's external context * @param names * the init parameter's names * * @return the init parameter value as a boolean * * @throws NullPointerException * if context or name is <code>null</code> */ public static boolean getBooleanInitParameter(ExternalContext context, String[] names) { return getBooleanInitParameter(context, names, false); }
/** * Gets the boolean init parameter value from the specified context. If the parameter was not specified, the default * value is used instead. * * @param context * the application's external context * @param name * the init parameter's name * @param deprecatedName * the init parameter's deprecated name. * @param defaultValue * the default value to return in case the parameter was not set * * @return the init parameter value as a boolean * * @throws NullPointerException * if context or name is <code>null</code> */ public static boolean getBooleanInitParameter(ExternalContext context, String name) { return getBooleanInitParameter(context, name, false); }
/** * Gets the boolean init parameter value from the specified context. If the parameter was not specified, the default * value is used instead. * * @param context * the application's external context * @param name * the init parameter's name * @param deprecatedName * the init parameter's deprecated name. * @param defaultValue * the default value to return in case the parameter was not set * * @return the init parameter value as a boolean * * @throws NullPointerException * if context or name is <code>null</code> */ public static boolean getBooleanInitParameter(ExternalContext context, String name) { return getBooleanInitParameter(context, name, false); }
public InternalClassLoaderResourceLoader(String prefix) { super(prefix); _useMultipleJsFilesForJsfUncompressedJs = WebConfigParamUtils.getBooleanInitParameter(FacesContext.getCurrentInstance().getExternalContext(), USE_MULTIPLE_JS_FILES_FOR_JSF_UNCOMPRESSED_JS, false); }
protected boolean isHandlingStateCachingMechanics(FacesContext facesContext) { if (_handleStateCachingMechanics == null) { _handleStateCachingMechanics = WebConfigParamUtils.getBooleanInitParameter(facesContext.getExternalContext(), INIT_PARAM_HANDLE_STATE_CACHING_MECHANICS, true); } return _handleStateCachingMechanics.booleanValue(); }
public InternalClassLoaderResourceLoader(String prefix) { super(prefix); _useMultipleJsFilesForJsfUncompressedJs = WebConfigParamUtils.getBooleanInitParameter(FacesContext.getCurrentInstance().getExternalContext(), USE_MULTIPLE_JS_FILES_FOR_JSF_UNCOMPRESSED_JS, false); }
/** * Load the various options for Facelets compiler. Currently only comment skipping is supported. * * @param context * the current FacesContext * @param compiler * the page compiler */ protected void loadOptions(FacesContext context, Compiler compiler) { ExternalContext eContext = context.getExternalContext(); // skip comments? compiler.setTrimmingComments(WebConfigParamUtils.getBooleanInitParameter(eContext, PARAMS_SKIP_COMMENTS, false)); }
/** * Load the various options for Facelets compiler. Currently only comment skipping is supported. * * @param context * the current FacesContext * @param compiler * the page compiler */ protected void loadOptions(FacesContext context, Compiler compiler) { ExternalContext eContext = context.getExternalContext(); // skip comments? compiler.setTrimmingComments(WebConfigParamUtils.getBooleanInitParameter(eContext, PARAMS_SKIP_COMMENTS, false)); }
private boolean isResourceCachingEnabled() { if (_resourceCacheEnabled == null) { FacesContext facesContext = FacesContext.getCurrentInstance(); //first, check to make sure that ProjectStage is production, if not, skip caching if (!facesContext.isProjectStage(ProjectStage.Production)) { return _resourceCacheEnabled = Boolean.FALSE; } ExternalContext externalContext = facesContext.getExternalContext(); if (externalContext == null) return false; //don't cache right now, but don't disable it yet either //if in production, make sure that the cache is not explicitly disabled via context param _resourceCacheEnabled = WebConfigParamUtils.getBooleanInitParameter(externalContext, ResourceHandlerCache.RESOURCE_HANDLER_CACHE_ENABLED_ATTRIBUTE, ResourceHandlerCache.RESOURCE_HANDLER_CACHE_ENABLED_DEFAULT); if (log.isLoggable(Level.FINE)) { log.log(Level.FINE, "MyFaces Resource Caching Enabled=" + _resourceCacheEnabled); } } return _resourceCacheEnabled; }
private boolean isCheckedViewIdCachingEnabled(FacesContext context) { if (_checkedViewIdCacheEnabled == null) { // first, check if the ProjectStage is development and skip caching in this case if (context.isProjectStage(ProjectStage.Development)) { _checkedViewIdCacheEnabled = Boolean.FALSE; } else { // in all ohter cases, make sure that the cache is not explicitly disabled via context param _checkedViewIdCacheEnabled = WebConfigParamUtils.getBooleanInitParameter(context.getExternalContext(), CHECKED_VIEWID_CACHE_ENABLED_ATTRIBUTE, CHECKED_VIEWID_CACHE_ENABLED_DEFAULT); } if (log.isLoggable(Level.FINE)) { log.log(Level.FINE, "MyFaces ViewID Caching Enabled=" + _checkedViewIdCacheEnabled); } } return _checkedViewIdCacheEnabled; }
private boolean isCheckedViewIdCachingEnabled(FacesContext context) { if (_checkedViewIdCacheEnabled == null) { // first, check if the ProjectStage is development and skip caching in this case if (context.isProjectStage(ProjectStage.Development)) { _checkedViewIdCacheEnabled = Boolean.FALSE; } else { // in all ohter cases, make sure that the cache is not explicitly disabled via context param _checkedViewIdCacheEnabled = WebConfigParamUtils.getBooleanInitParameter(context.getExternalContext(), CHECKED_VIEWID_CACHE_ENABLED_ATTRIBUTE, CHECKED_VIEWID_CACHE_ENABLED_DEFAULT); } if (log.isLoggable(Level.FINE)) { log.log(Level.FINE, "MyFaces ViewID Caching Enabled=" + _checkedViewIdCacheEnabled); } } return _checkedViewIdCacheEnabled; }
private boolean isResourceCachingEnabled() { if (_resourceCacheEnabled == null) { FacesContext facesContext = FacesContext.getCurrentInstance(); //first, check to make sure that ProjectStage is production, if not, skip caching if (!facesContext.isProjectStage(ProjectStage.Production)) { return _resourceCacheEnabled = Boolean.FALSE; } ExternalContext externalContext = facesContext.getExternalContext(); if (externalContext == null) return false; //don't cache right now, but don't disable it yet either //if in production, make sure that the cache is not explicitly disabled via context param _resourceCacheEnabled = WebConfigParamUtils.getBooleanInitParameter(externalContext, ResourceHandlerCache.RESOURCE_HANDLER_CACHE_ENABLED_ATTRIBUTE, ResourceHandlerCache.RESOURCE_HANDLER_CACHE_ENABLED_DEFAULT); if (log.isLoggable(Level.FINE)) { log.log(Level.FINE, "MyFaces Resource Caching Enabled=" + _resourceCacheEnabled); } } return _resourceCacheEnabled; }
if (!WebConfigParamUtils.getBooleanInitParameter(facesContext.getExternalContext(), INITIALIZE_ALWAYS_STANDALONE, false))
if (!WebConfigParamUtils.getBooleanInitParameter(facesContext.getExternalContext(), INITIALIZE_ALWAYS_STANDALONE, false))
if (!WebConfigParamUtils.getBooleanInitParameter(externalContext, INITIALIZE_ALWAYS_STANDALONE, false))
if (!WebConfigParamUtils.getBooleanInitParameter(externalContext, INITIALIZE_ALWAYS_STANDALONE, false))
_partialStateSaving = WebConfigParamUtils.getBooleanInitParameter(context, StateManager.PARTIAL_STATE_SAVING_PARAM_NAME, partialStateSavingDefault); _markInitialStateWhenApplyBuildView = WebConfigParamUtils.getBooleanInitParameter(context, PARAM_MARK_INITIAL_STATE_WHEN_APPLY_BUILD_VIEW, false);
_partialStateSaving = WebConfigParamUtils.getBooleanInitParameter(context, StateManager.PARTIAL_STATE_SAVING_PARAM_NAME, partialStateSavingDefault);