本文整理汇总了Java中com.ibm.xsp.context.FacesContextEx.getProperty方法的典型用法代码示例。如果您正苦于以下问题:Java FacesContextEx.getProperty方法的具体用法?Java FacesContextEx.getProperty怎么用?Java FacesContextEx.getProperty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.ibm.xsp.context.FacesContextEx
的用法示例。
在下文中一共展示了FacesContextEx.getProperty方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getInfiniteScroll
import com.ibm.xsp.context.FacesContextEx; //导入方法依赖的package包/类
protected boolean getInfiniteScroll(String dataViewInfiniteScroll,FacesContext context )
{
boolean isAuto = false;
if(dataViewInfiniteScroll == null)
{
isAuto = true;
}
else
{
isAuto = dataViewInfiniteScroll.equalsIgnoreCase(AUTO); // $NON-NLS-1$
}
if(isAuto) {
if( context instanceof FacesContextEx ) {
FacesContextEx contextEx = (FacesContextEx)context;
//xsp.progressive.enhancement = enable | disable
String progEnhancement = contextEx.getProperty(XSP_PROGRESSIVE_ENH); // $NON-NLS-1$
if(progEnhancement == null) { // is not set
return false;
}
return progEnhancement.equalsIgnoreCase(ENABLE);
}
}
return dataViewInfiniteScroll.equalsIgnoreCase(ENABLE);
}
示例2: getIndentStyle
import com.ibm.xsp.context.FacesContextEx; //导入方法依赖的package包/类
protected String getIndentStyle(FacesContext context, AbstractDataView c, ViewDefinition viewDef, int level, int sublevel) throws IOException {
// Ref SPR# PHAN9E3FUG Subcategories created from backslashes in Categories need to be handled better in the Data View
FacesContextEx ctx = (context instanceof FacesContextEx) ? (FacesContextEx)context : null;
if (ctx != null) {
boolean doAutoIndent = true;
String propAutoIndent = ctx.getProperty("xsp.domino.view.embeddedsubcategories.autoindent"); // $NON-NLS-1$
if (!StringUtil.isEmpty(propAutoIndent)) {
doAutoIndent = Boolean.parseBoolean(propAutoIndent);
}
if (doAutoIndent) {
if(level>0 || sublevel>0) {
Integer indentPxSub = (Integer)getProperty(PROP_TABLEROWINDENTPX);
if(indentPxSub>0) {
// Category column width needs to be wider than the subcategory width
// These properties (PROP_TABLEROWINDENTPX etc) do not appear to be configurable
// WITHOUT subclassing Java classes? Should be handled by themes!
// Quick remedy is just to increase the width by an arbitrary number of pixels
Integer indentPxCol = indentPxSub + 10;
int padValue = (indentPxCol * level) + (indentPxSub * sublevel);
String paddingDir = DirLangUtil.isRTL(c) ? "padding-right:" : "padding-left:"; //$NON-NLS-1$ //$NON-NLS-2$
String style = paddingDir + (padValue) + "px !important"; // $NON-NLS-1$ $NON-NLS-2$
return style;
}
}
} else {
return getIndentStyle(context, c, viewDef, level);
}
}
return null;
}
示例3: readProperty
import com.ibm.xsp.context.FacesContextEx; //导入方法依赖的package包/类
protected String readProperty(FacesContextEx context, String name, String def) {
if(StringUtil.isNotEmpty(name)) {
String s = context.getProperty(name);
if(StringUtil.isNotEmpty(s)) {
return s;
}
}
return def;
}
示例4: readPropertyInt
import com.ibm.xsp.context.FacesContextEx; //导入方法依赖的package包/类
protected int readPropertyInt(FacesContextEx context, String name, int def) {
if(StringUtil.isNotEmpty(name)) {
String s = context.getProperty(name);
if(StringUtil.isNotEmpty(s)) {
try {
return Integer.parseInt(s);
} catch(Exception e) {} // Use the default value for a bad integer
}
}
return def;
}
示例5: getBooleanProperty
import com.ibm.xsp.context.FacesContextEx; //导入方法依赖的package包/类
private boolean getBooleanProperty(FacesContextEx facesContext, String optionName, boolean optionDefault) {
boolean suppressDatabaseNameParam;
String optionAsString = facesContext.getProperty(optionName);
suppressDatabaseNameParam = (null == optionAsString)? optionDefault : "true".equalsIgnoreCase(optionAsString); //$NON-NLS-1$
return suppressDatabaseNameParam;
}