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


Java XSPContext类代码示例

本文整理汇总了Java中com.ibm.xsp.designer.context.XSPContext的典型用法代码示例。如果您正苦于以下问题:Java XSPContext类的具体用法?Java XSPContext怎么用?Java XSPContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


XSPContext类属于com.ibm.xsp.designer.context包,在下文中一共展示了XSPContext类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: toolbarClick

import com.ibm.xsp.designer.context.XSPContext; //导入依赖的package包/类
/**
 * Will be triggered by an outline onItemClick event. Can be used for toolbars, dropdown menus, etc.
 */
public void toolbarClick() {
	XSPContext context=XSPContext.getXSPContext(FacesContext.getCurrentInstance());
	String selection=context.getSubmittedValue();
	
	if("selectAll".equals(selection)) {
		selectAll();
	} else if("deselectAll".equals(selection)) {
		deselectAll();
	} else if("removeSelected".equals(selection)) {
		removeSelected();
	} else if("toggleLcv".equals(selection)) {
		toggleLcv();
	} else if("sortByLcv".equals(selection)) {
		sortByLcv();
	} else if("sortByName".equals(selection)) {
		sortByName();
	}
	
}
 
开发者ID:sbasegmez,项目名称:Blogged,代码行数:23,代码来源:ParticipantList.java

示例2: getMyGroupsAndRoles

import com.ibm.xsp.designer.context.XSPContext; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public List<String> getMyGroupsAndRoles() {
	List<String> lstRC = new ArrayList<String>();
	try {
		XSPContext xsp = ExtLibUtil.getXspContext();
		DirectoryUser dirUser = xsp.getUser();
		Name nonUser = ExtLibUtil.getCurrentSession().createName(ExtLibUtil.getCurrentSession().getEffectiveUserName());
		lstRC.add(nonUser.getCanonical());
		lstRC.add(nonUser.getAbbreviated());
		lstRC.add(nonUser.getCommon());
		lstRC.addAll(dirUser.getGroups());
		lstRC.addAll(dirUser.getRoles());

	} catch (Exception e) {
		e.printStackTrace();
	}
	return lstRC;

}
 
开发者ID:OpenNTF,项目名称:XPagesToolkit,代码行数:20,代码来源:RoleAndGroupProvider.java

示例3: initViewDefinition

import com.ibm.xsp.designer.context.XSPContext; //导入依赖的package包/类
@Override
protected void initViewDefinition(FacesContext context, AbstractDataView _dataView, ViewDefinition viewDef) {
    UIForumView dataView = (UIForumView)_dataView;
    super.initViewDefinition(context, dataView, viewDef);

    // Define if the items must be rendered in a table, 
    // Use a table for IE as CSS float is largely buggy - Hope IE9 fixes this...
    viewDef.viewforumRenderAsTable = XSPContext.getXSPContext(context).getUserAgent().isIE(0,8);
    
    // It is only one or the other, never both...
    viewDef.summaryOrDetailVisible = true;
    
    // Just to be sure...
    viewDef.collapsibleRows = false;
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:16,代码来源:ForumViewRenderer.java

示例4: isRowRefresh

import com.ibm.xsp.designer.context.XSPContext; //导入依赖的package包/类
public boolean isRowRefresh(FacesContext context) {
    if (ENABLE_PARTIAL_REFRESH_ROW) {
        // This mode is only supported if a partial tree is rendered
        if (((FacesContextEx) context).isAjaxWholeTreeRendered()) {
            return false;
        }
        // There is an issue with IE refreshing a single row
        if (/* ExtLibCompUtil.isXPages852() && */XSPContext
                .getXSPContext(context).getUserAgent().isIE(0, 8)) {
            return false;
        }
        return true;
    }
    return false;
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:16,代码来源:AbstractDataView.java

示例5: isLoggedIn

import com.ibm.xsp.designer.context.XSPContext; //导入依赖的package包/类
protected boolean isLoggedIn() {
    XSPContext ctx = XSPContext.getXSPContext(FacesContext.getCurrentInstance());
    if(ctx!=null) {
        com.ibm.designer.runtime.directory.DirectoryUser user = ctx.getUser();
        return !user.isAnonymous();
    }
    return false;
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:9,代码来源:LoginTreeNode.java

示例6: renderService

import com.ibm.xsp.designer.context.XSPContext; //导入依赖的package包/类
@Override
public void renderService() throws ServiceException {
	// SPR# LHEY8YSE4F - calendar data does not refresh on IE due to browser caching problem
	// We override the renderService just to set the Expires header to -1 for IE only ...
	// and only for this specific service! If others report same issue then promote fix accordingly.
	super.renderService();
	if (XSPContext.getXSPContext(FacesContext.getCurrentInstance()).getUserAgent().isIE()) {
		getHttpResponse().setHeader("Expires", "-1");  // $NON-NLS-1$ $NON-NLS-2$
	}
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:11,代码来源:DominoCalendarJsonLegacyService.java

示例7: getXspProperty

import com.ibm.xsp.designer.context.XSPContext; //导入依赖的package包/类
/**
 * Returns a XSP property value
 */
public static String getXspProperty(String name) {
	XSPContext context = getXspContext();
	if(context!=null)
		return context.getProperty(name);
	else
		return null;
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:11,代码来源:ExtLibUtil.java

示例8: getStringProperty

import com.ibm.xsp.designer.context.XSPContext; //导入依赖的package包/类
public static String getStringProperty(XSPContext ctx, String propName, String defaultValue) {
    String v = ctx.getProperty(propName);
    if(v==null) {
        return defaultValue;
    }
    return v;
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:8,代码来源:ExtLibUtil.java

示例9: getIntProperty

import com.ibm.xsp.designer.context.XSPContext; //导入依赖的package包/类
public static int getIntProperty(XSPContext ctx, String propName, int defaultValue) {
    String v = ctx.getProperty(propName);
    if(v==null) {
        return defaultValue;
    }
    return Integer.valueOf(v);
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:8,代码来源:ExtLibUtil.java

示例10: getBooleanProperty

import com.ibm.xsp.designer.context.XSPContext; //导入依赖的package包/类
public static boolean getBooleanProperty(XSPContext ctx, String propName, boolean defaultValue) {
    String v = ctx.getProperty(propName);
    if(v==null) {
        return defaultValue;
    }
    return Boolean.valueOf(v);
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:8,代码来源:ExtLibUtil.java

示例11: getUrl

import com.ibm.xsp.designer.context.XSPContext; //导入依赖的package包/类
public static XSPUrl getUrl() {
	try {
		return XSPContext.getXSPContext(getContext()).getUrl();
	} catch (Exception e) {
		return null;
	}
}
 
开发者ID:majkilde,项目名称:LogFileReader,代码行数:8,代码来源:XSPUtils.java

示例12: getTranslationBundle

import com.ibm.xsp.designer.context.XSPContext; //导入依赖的package包/类
private ResourceBundle getTranslationBundle() throws IOException {
	if(bundle_ == null) {
		FacesContext facesContext = FacesContext.getCurrentInstance();
		ApplicationEx app = (ApplicationEx)facesContext.getApplication();
		bundle_ = app.getResourceBundle("translation", XSPContext.getXSPContext(facesContext).getLocale());
	}
	return bundle_;
}
 
开发者ID:jesse-gallagher,项目名称:XPages-Scaffolding,代码行数:9,代码来源:Translation.java

示例13: interpolate

import com.ibm.xsp.designer.context.XSPContext; //导入依赖的package包/类
@Override
public String interpolate(final String message, final MessageInterpolator.Context context) {
	Locale locale;
	if(FrameworkUtils.isFaces()) {
		locale = XSPContext.getXSPContext(FacesContext.getCurrentInstance()).getLocale();
	} else {
		locale = Locale.getDefault();
	}
	return interpolate(message, context, locale);
}
 
开发者ID:jesse-gallagher,项目名称:XPages-Scaffolding,代码行数:11,代码来源:AbstractModelObject.java

示例14: getTranslationBundle

import com.ibm.xsp.designer.context.XSPContext; //导入依赖的package包/类
@Override
public ResourceBundle getTranslationBundle() {
	FacesContext facesContext = FacesContext.getCurrentInstance();
	ApplicationEx app = (ApplicationEx)facesContext.getApplication();
	try {
		return app.getResourceBundle("model_translation", XSPContext.getXSPContext(facesContext).getLocale());
	} catch(IOException ioe) {
		return null;
	}
}
 
开发者ID:jesse-gallagher,项目名称:XPages-Scaffolding,代码行数:11,代码来源:ModelClassComponentMapAdapter.java

示例15: getStorageDatabase

import com.ibm.xsp.designer.context.XSPContext; //导入依赖的package包/类
private Database getStorageDatabase() {
	XSPContext context = ExtLibUtil.getXspContext();
	String databaseName = context.getProperty("frostillicus.dominostatemanager.database");
	Session session = (Session)JSFUtil.getSession();
	return session.getDatabase(databaseName);
}
 
开发者ID:jesse-gallagher,项目名称:Miscellany,代码行数:7,代码来源:DominoStateManager.java


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