当前位置: 首页>>代码示例>>Java>>正文


Java ApplicationEx.getInstance方法代码示例

本文整理汇总了Java中com.ibm.xsp.application.ApplicationEx.getInstance方法的典型用法代码示例。如果您正苦于以下问题:Java ApplicationEx.getInstance方法的具体用法?Java ApplicationEx.getInstance怎么用?Java ApplicationEx.getInstance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.ibm.xsp.application.ApplicationEx的用法示例。


在下文中一共展示了ApplicationEx.getInstance方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: BBerryPageCustomizer

import com.ibm.xsp.application.ApplicationEx; //导入方法依赖的package包/类
public BBerryPageCustomizer(FacesContext context, RequestParameters parameters) {
    super(context, parameters);

    // WARN: we cannot read the property from FacesContext as goes to
    // infinite
    // recursion, because FacesContext also relies on the request parameters
    // -> we directly read the property from the application object, which
    // can be then set at either the application or server level.
    ApplicationEx app = ApplicationEx.getInstance(context);
    String s = app.getApplicationProperty(MobileConstants.XSP_THEME_MOBILE_BBERRY, null);

    if (StringUtil.isNotEmpty(s)) {
        parameters.setProperty(MobileConstants.XSP_THEME_WEB, s);
    }
    else {
        s = app.getApplicationProperty(MobileConstants.XSP_THEME_MOBILE, BBerryConstants.BBERRY_THEME_NAME);
        parameters.setProperty(MobileConstants.XSP_THEME_WEB, s);
    }
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:20,代码来源:BBerryPageCustomizer.java

示例2: isMobilePage

import com.ibm.xsp.application.ApplicationEx; //导入方法依赖的package包/类
private boolean isMobilePage(FacesContext context) {
    ExternalContext o = context.getExternalContext();
    HttpServletRequest r = (javax.servlet.http.HttpServletRequest) o.getRequest();
    String path = r.getServletPath();
    ApplicationEx app = ApplicationEx.getInstance(context);
    String prefix = app.getApplicationProperty(MobileConstants.XSP_THEME_MOBILE_PAGEPREFIX, null);
    if (prefix == null) {
        return false;
    }
    else if (prefix.equals("*")) { // $NON-NLS-1$
        return true;
    }
    else {
        return path.startsWith("/" + prefix); // $NON-NLS-1$
    }
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:17,代码来源:MobileRequestCustomizerFactory.java

示例3: AndroidPageCustomizer

import com.ibm.xsp.application.ApplicationEx; //导入方法依赖的package包/类
public AndroidPageCustomizer(FacesContext context, RequestParameters parameters) {
    super(context, parameters);

    // WARN: we cannot read the property from FacesContext as goes to
    // infinite
    // recursion, because FacesContext also relies on the request parameters
    // -> we directly read the property from the application object, which
    // can be then set at either the application or server level.
    ApplicationEx app = ApplicationEx.getInstance(context);
    String s = app.getApplicationProperty(MobileConstants.XSP_THEME_MOBILE_ANDROID, null);

    if (StringUtil.isNotEmpty(s)) {
        parameters.setProperty(MobileConstants.XSP_THEME_WEB, s);
    }
    else {
        s = app.getApplicationProperty(MobileConstants.XSP_THEME_MOBILE, AndroidConstants.ANDROID_THEME_NAME);
        parameters.setProperty(MobileConstants.XSP_THEME_WEB, s);
    }
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:20,代码来源:AndroidPageCustomizer.java

示例4: IPhonePageCustomizer

import com.ibm.xsp.application.ApplicationEx; //导入方法依赖的package包/类
public IPhonePageCustomizer(FacesContext context, RequestParameters parameters) {
    super(context, parameters);

    // WARN: we cannot read the property from FacesContext as goes to
    // infinite
    // recursion, because FacesContext also relies on the request parameters
    // -> we directly read the property from the application object, which
    // can be then set at either the application or server level.
    ApplicationEx app = ApplicationEx.getInstance(context);
    String s = app.getApplicationProperty(MobileConstants.XSP_THEME_MOBILE_IPHONE, null);

    if (StringUtil.isNotEmpty(s)) {
        parameters.setProperty(MobileConstants.XSP_THEME_WEB, s);
    }
    else {
        s = app.getApplicationProperty(MobileConstants.XSP_THEME_MOBILE, IPhoneConstants.IPHONE_THEME_NAME);
        parameters.setProperty(MobileConstants.XSP_THEME_WEB, s);
    }
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:20,代码来源:IPhonePageCustomizer.java

示例5: MemberDataProvider

import com.ibm.xsp.application.ApplicationEx; //导入方法依赖的package包/类
public MemberDataProvider() {
	ApplicationEx app = ApplicationEx.getInstance();
	NO_IMAGE_URL = app.getApplicationProperty("thumbnailUrl.noImageUrl", "/thumbNoImage.png");
	try {
		IMAGE_URL = "/.ibmmodres/";
	} catch (Exception e) {
		e.printStackTrace();
	}
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:10,代码来源:MemberDataProvider.java

示例6: AbstractPager

import com.ibm.xsp.application.ApplicationEx; //导入方法依赖的package包/类
public AbstractPager() {
    super();
       
       ApplicationEx app = ApplicationEx.getInstance();
       defaultRowCount = Integer.parseInt(app.getApplicationProperty(PAGER_ADDROWS_DEFAULT_ROWCOUNT_PROPERTY, PAGER_ADDROWS_DEFAULT_ROWCOUNT_DEFVAL));
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:7,代码来源:AbstractPager.java


注:本文中的com.ibm.xsp.application.ApplicationEx.getInstance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。