gpt4 book ai didi

com.sun.faces.config.WebConfiguration.getInstance()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-24 07:21:05 26 4
gpt4 key购买 nike

本文整理了Java中com.sun.faces.config.WebConfiguration.getInstance()方法的一些代码示例,展示了WebConfiguration.getInstance()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebConfiguration.getInstance()方法的具体详情如下:
包路径:com.sun.faces.config.WebConfiguration
类名称:WebConfiguration
方法名:getInstance

WebConfiguration.getInstance介绍

[英]Return the WebConfiguration instance for this application passing the result of FacesContext.getCurrentInstance().getExternalContext() to #getInstance(javax.faces.context.ExternalContext).
[中]返回此应用程序的WebConfiguration实例,并传递FacesContext的结果。getCurrentInstance()。getExternalContext()到#getInstance(javax.faces.context.ExternalContext)。

代码示例

代码示例来源:origin: com.sun.faces/jsf-impl

/**
 * Constructs a new ResourceCache.
 */
public ResourceCache() {
  this(WebConfiguration.getInstance());
}

代码示例来源:origin: org.glassfish/javax.faces

/**
 * Constructs a new ResourceCache.
 */
public ResourceCache() {
  this(WebConfiguration.getInstance());
}

代码示例来源:origin: javax.faces/jsf-impl

private WebConfiguration getWebConfig(FacesContext context) {
  if (webConfig == null) {
    webConfig = WebConfiguration.getInstance(context.getExternalContext());
  }
  return webConfig;
}

代码示例来源:origin: com.sun.faces/jsf-impl

/**
 * Return the WebConfiguration instance for this application passing
 * the result of FacesContext.getCurrentInstance().getExternalContext()
 * to {@link #getInstance(javax.faces.context.ExternalContext)}.
 * @return the WebConfiguration for this application or <code>null</code>
 *  if no FacesContext is available.
 */
public static WebConfiguration getInstance() {
  FacesContext facesContext = FacesContext.getCurrentInstance();
  return getInstance(facesContext.getExternalContext());
}

代码示例来源:origin: com.sun.faces/jsf-impl

private void init() {
  WebConfiguration webconfig = WebConfiguration.getInstance();
  enableMissingResourceLibraryDetection =
      webconfig.isOptionEnabled(EnableMissingResourceLibraryDetection);
}

代码示例来源:origin: org.glassfish/javax.faces

/**
 * Creates a new <code>AnnotationScanner</code> instance.
 *
 * @param sc the <code>ServletContext</code> for the application to be
 *  scanned
 */
public AnnotationScanner(ServletContext sc) {
  super(sc);
  WebConfiguration webConfig = WebConfiguration.getInstance(sc);
initializeAnnotationScanPackages(sc, webConfig);
}

代码示例来源:origin: org.glassfish/jakarta.faces

private void init() {
  WebConfiguration webconfig = WebConfiguration.getInstance();
  enableMissingResourceLibraryDetection =
      webconfig.isOptionEnabled(EnableMissingResourceLibraryDetection);
}

代码示例来源:origin: org.glassfish/javax.faces

public ViewHandlingStrategy() {
  FacesContext ctx = FacesContext.getCurrentInstance();
  webConfig = WebConfiguration.getInstance(ctx.getExternalContext());
  associate = ApplicationAssociate.getInstance(ctx.getExternalContext());
}

代码示例来源:origin: com.sun.faces/jsf-impl

public ViewHandlingStrategy() {
  FacesContext ctx = FacesContext.getCurrentInstance();
  webConfig = WebConfiguration.getInstance(ctx.getExternalContext());
  associate = ApplicationAssociate.getInstance(ctx.getExternalContext());
}

代码示例来源:origin: com.sun.faces/jsf-impl

public ApplicationStateInfo() {
  WebConfiguration config = WebConfiguration.getInstance();
  partialStateSaving = config.isOptionEnabled(PartialStateSaving);
  if (partialStateSaving) {
    String[] viewIds = config.getOptionValue(FullStateSavingViewIds, ",");
    fullStateViewIds = new HashSet<String>(viewIds.length, 1.0f);
    fullStateViewIds.addAll(Arrays.asList(viewIds));
  }
  
}

代码示例来源:origin: org.glassfish/jakarta.faces

public ApplicationStateInfo() {
  WebConfiguration config = WebConfiguration.getInstance();
  partialStateSaving = config.isOptionEnabled(PartialStateSaving);
  if (partialStateSaving) {
    String[] viewIds = config.getOptionValue(FullStateSavingViewIds, ",");
    fullStateViewIds = new HashSet<>(viewIds.length, 1.0f);
    fullStateViewIds.addAll(asList(viewIds));
  }
}

代码示例来源:origin: org.glassfish/javax.faces

public LifecycleImpl(FacesContext context) {
  ExternalContext extContext = context.getExternalContext();
  config = WebConfiguration.getInstance(extContext);
  context.getApplication().subscribeToEvent(PostConstructApplicationEvent.class,
           Application.class, new PostConstructApplicationListener());
  
}

代码示例来源:origin: com.sun.faces/jsf-impl

public ViewHandlerImpl() {
  if (logger.isLoggable(Level.FINE)) {
    logger.log(Level.FINE,"Created ViewHandler instance ");
  }
  WebConfiguration config = WebConfiguration.getInstance();
  String defaultSuffixConfig =
     config.getOptionValue(WebConfiguration.WebContextInitParameter.DefaultSuffix);
  Map<String, Object> appMap = FacesContext.getCurrentInstance().getExternalContext().getApplicationMap();
  configuredExtensions = Util.split(appMap, defaultSuffixConfig, " ");
}

代码示例来源:origin: org.glassfish/javax.faces

@Override
public FaceletCache getFaceletCache() {
  WebConfiguration webConfig = WebConfiguration.getInstance();
  String refreshPeriod = webConfig.getOptionValue(WebConfiguration.WebContextInitParameter.FaceletsDefaultRefreshPeriod);
  long period = Long.parseLong(refreshPeriod) * 1000;
  FaceletCache<DefaultFacelet> result = new DefaultFaceletCache(period);
  return result;
}

代码示例来源:origin: org.glassfish/jakarta.faces

@Override
public FaceletCache getFaceletCache() {
  WebConfiguration webConfig = WebConfiguration.getInstance();
  String refreshPeriod = webConfig.getOptionValue(WebConfiguration.WebContextInitParameter.FaceletsDefaultRefreshPeriod);
  long period = Long.parseLong(refreshPeriod) * 1000;
  FaceletCache<DefaultFacelet> result = new DefaultFaceletCache(period);
  return result;
}

代码示例来源:origin: org.glassfish/javax.faces

public ClasspathResourceHelper() {
  WebConfiguration webconfig = WebConfiguration.getInstance();
  cacheTimestamp = webconfig.isOptionEnabled(CacheResourceModificationTimestamp);
  enableMissingResourceLibraryDetection =
      webconfig.isOptionEnabled(EnableMissingResourceLibraryDetection);
}

代码示例来源:origin: com.sun.faces/jsf-impl

public ClasspathResourceHelper() {
  WebConfiguration webconfig = WebConfiguration.getInstance();
  cacheTimestamp = webconfig.isOptionEnabled(CacheResourceModificationTimestamp);
  enableMissingResourceLibraryDetection =
      webconfig.isOptionEnabled(EnableMissingResourceLibraryDetection);
}

代码示例来源:origin: com.sun.faces/jsf-impl

public ResponseStateManagerImpl() {
  WebConfiguration webConfig = WebConfiguration.getInstance();
  String stateMode =
     webConfig.getOptionValue(StateSavingMethod);
  helper = ((StateManager.STATE_SAVING_METHOD_CLIENT.equalsIgnoreCase(stateMode)
        ? new ClientSideStateHelper()
        : new ServerSideStateHelper()));
}

代码示例来源:origin: org.glassfish/javax.faces

public MultiViewHandler() {
  WebConfiguration config = WebConfiguration.getInstance();
     
  configuredExtensions = config.getConfiguredExtensions();
  extensionsSet = config.isSet(WebConfiguration.WebContextInitParameter.DefaultSuffix);
  vdlFactory = (ViewDeclarationLanguageFactory) FactoryFinder.getFactory(VIEW_DECLARATION_LANGUAGE_FACTORY);
  protectedViews = new CopyOnWriteArraySet<>();
}

代码示例来源:origin: com.sun.faces/jsf-impl

public MultiViewHandler() {
  WebConfiguration config = WebConfiguration.getInstance();
     
  configuredExtensions = config.getConfiguredExtensions();
  extensionsSet = config.isSet(WebConfiguration.WebContextInitParameter.DefaultSuffix);
  vdlFactory = (ViewDeclarationLanguageFactory)
      FactoryFinder.getFactory(FactoryFinder.VIEW_DECLARATION_LANGUAGE_FACTORY);
  protectedViews = new CopyOnWriteArraySet<String>();
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com