本文整理汇总了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);
}
}
示例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$
}
}
示例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);
}
}
示例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);
}
}
示例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();
}
}
示例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));
}