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


Java TypedUtil.getRequestMap方法代码示例

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


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

示例1: createSession

import com.ibm.xsp.util.TypedUtil; //导入方法依赖的package包/类
private org.openntf.domino.Session createSession(final FacesContextEx ctx) {
	org.openntf.domino.Session session = null;
	String sessionKey = isAppGodMode(ctx) ? "session" : "opensession";
	Map<String, Object> localMap = TypedUtil.getRequestMap(ctx.getExternalContext());
	lotus.domino.Session rawSession = (lotus.domino.Session) localMap.get("session");
	if (rawSession == null) {
		rawSession = (lotus.domino.Session) ctx.getApplication().getVariableResolver().resolveVariable(ctx, "session");
	}
	if (rawSession != null) {
		session = Factory.fromLotus(rawSession, org.openntf.domino.Session.class, null);
		if (isAppAllFix(ctx)) {
			for (Fixes fix : Fixes.values()) {
				session.setFixEnable(fix, true);
			}
		}
		if (isAppMimeFriendly(ctx))
			session.setConvertMIME(false);
		localMap.put(sessionKey, session);
	} else {
		System.out.println("Unable to locate 'session' through request map or variable resolver. Unable to auto-wrap.");
	}
	return session;
}
 
开发者ID:OpenNTF,项目名称:org.openntf.domino,代码行数:24,代码来源:OpenntfDominoImplicitObjectFactory.java

示例2: createDatabase

import com.ibm.xsp.util.TypedUtil; //导入方法依赖的package包/类
private org.openntf.domino.Database createDatabase(final FacesContextEx ctx, final org.openntf.domino.Session session) {
	org.openntf.domino.Database database = null;
	String dbKey = isAppGodMode(ctx) ? "database" : "opendatabase";
	Map<String, Object> localMap = TypedUtil.getRequestMap(ctx.getExternalContext());
	lotus.domino.Database rawDatabase = (lotus.domino.Database) localMap.get("database");
	if (rawDatabase == null) {
		rawDatabase = (lotus.domino.Database) ctx.getApplication().getVariableResolver().resolveVariable(ctx, "database");
	}
	if (rawDatabase != null) {
		database = Factory.fromLotus(rawDatabase, org.openntf.domino.Database.class, session);
		localMap.put(dbKey, database);
	} else {
		System.out.println("Unable to locate 'database' through request map or variable resolver. Unable to auto-wrap.");
	}
	return database;
}
 
开发者ID:OpenNTF,项目名称:org.openntf.domino,代码行数:17,代码来源:OpenntfDominoImplicitObjectFactory.java

示例3: createImplicitObjects

import com.ibm.xsp.util.TypedUtil; //导入方法依赖的package包/类
/**
 * Creates the "cheap" objects
 */
@Override
public void createImplicitObjects(final FacesContextEx ctx) {
	if (!implicitsDone_) {
		implicitsDone_ = true;
		if (!ODAPlatform.isAPIEnabled(null))
			return;

		Session session = Factory.getSession(SessionType.CURRENT);

		Database db = session.getCurrentDatabase();
		Map<String, Object> ecMap = TypedUtil.getRequestMap(ctx.getExternalContext());

		ecMap.put("openSession", session);
		ecMap.put("openDatabase", db);

		// Attach NSA
		if (ODAPlatform.isAppFlagSet("nsa")) {
			Application app = ctx.getApplication();
			if (app instanceof ApplicationEx) {
				NSA.INSTANCE.registerApplication((ApplicationEx) app);
				NSA.INSTANCE.registerSession((ApplicationEx) app, (HttpSession) ctx.getExternalContext().getSession(true));
			}
		}
	}
}
 
开发者ID:OpenNTF,项目名称:org.openntf.domino,代码行数:29,代码来源:OpenntfDominoImplicitObjectFactory.java

示例4: createImplicitObjects

import com.ibm.xsp.util.TypedUtil; //导入方法依赖的package包/类
@Override
public void createImplicitObjects() {
	if (!implicitsDone_) {
		super.createImplicitObjects();
		//			System.out.println("DEBUG: Requesting implicit objects on ODAFacesContext " + System.identityHashCode(this));
		if (ODAPlatform.isAppGodMode(null)) {
			Session session = Factory.getSession(SessionType.CURRENT);
			Database db = session.getCurrentDatabase();
			Map<String, Object> ecMap = TypedUtil.getRequestMap(getExternalContext());

			// overwrite the DominoImplicitObjects objects
			ecMap.put("session", session);
			ecMap.put("database", db);
		}
		implicitsDone_ = true;
	}
}
 
开发者ID:OpenNTF,项目名称:org.openntf.domino,代码行数:18,代码来源:ODAFacesContext.java

示例5: push

import com.ibm.xsp.util.TypedUtil; //导入方法依赖的package包/类
private void push(FacesContext context) {
    Map<String, Object> map = TypedUtil.getRequestMap(context.getExternalContext());
    if(StringUtil.isNotEmpty(var)) {
        oldValue = map.get(var);
        map.put(var, value);
    }
    if(StringUtil.isNotEmpty(indexVar)) {
        oldIndex = map.get(indexVar);
        map.put(indexVar, index);
    }
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:12,代码来源:TreeNodeWrapper.java

示例6: set

import com.ibm.xsp.util.TypedUtil; //导入方法依赖的package包/类
private void set(FacesContext context) {
    Map<String, Object> map = TypedUtil.getRequestMap(context.getExternalContext());
    if(StringUtil.isNotEmpty(var)) {
        map.put(var, value);
    }
    if(StringUtil.isNotEmpty(indexVar)) {
        map.put(indexVar, index);
    }
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:10,代码来源:TreeNodeWrapper.java

示例7: pop

import com.ibm.xsp.util.TypedUtil; //导入方法依赖的package包/类
private void pop(FacesContext context) {
    Map<String, Object> map = TypedUtil.getRequestMap(context.getExternalContext());
    if(StringUtil.isNotEmpty(var)) {
        map.put(var,oldValue);
    }
    if(StringUtil.isNotEmpty(indexVar)) {
        map.put(indexVar,oldIndex);
    }
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:10,代码来源:TreeNodeWrapper.java

示例8: show

import com.ibm.xsp.util.TypedUtil; //导入方法依赖的package包/类
public void show(Map<String,String> parameters) {
    FacesContextEx context = FacesContextEx.getCurrentInstance();

    // Push the parameters to the request scope
    if(parameters!=null) { // TODO why? the requestScope already contains the params
        Map<String, Object> req = TypedUtil.getRequestMap(context.getExternalContext());
        for (Map.Entry<String, String> e : parameters.entrySet()) {
            req.put(e.getKey(), e.getValue());
        }
    }
    
    // Add the content
    createContent(context);
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:15,代码来源:UIInPlaceForm.java

示例9: pushParameters

import com.ibm.xsp.util.TypedUtil; //导入方法依赖的package包/类
public static void pushParameters(FacesContext context, Map<String,String> parameters) {
    // Push the parameters to the request scope
    if(parameters!=null) { // TODO why? the request params are already in the requestScope.
        Map<String, Object> req = TypedUtil.getRequestMap(context.getExternalContext());
        for (Map.Entry<String, String> e : parameters.entrySet()) {
            req.put(e.getKey(), e.getValue());
        }
    }
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:10,代码来源:ExtLibUtil.java

示例10: encodeGroup

import com.ibm.xsp.util.TypedUtil; //导入方法依赖的package包/类
private void encodeGroup(final FacesContext context, final XspPager pager, final UIPager.PagerState st, final ResponseWriter writer, final XspPagerControl control, final int start, final int end) throws IOException {
	// Save the old page value
	Map<String, Object> requestMap = TypedUtil.getRequestMap(context.getExternalContext());
	Object oldPage = requestMap.get(VAR_PAGE);

	String clientId = pager.getClientId(context);
	String controlId = clientId + "__" + control.getType();//$NON-NLS-1$

	// Encode the pages
	for (int i = start; i < end; i++) {
		// Push the page number
		requestMap.put(VAR_PAGE, i + 1);
		boolean renderLink = (i != st.getCurrentPage());

		writer.startElement("li", null);
		if (!renderLink) {
			writer.writeAttribute("class", "active", null);
		}

		String val = (String) control.getValue();
		if (StringUtil.isEmpty(val)) {
			val = Integer.toString(i + 1);
		}

		// Generate the text link
		if (StringUtil.isNotEmpty(val)) {
			writer.startElement("a", control); //$NON-NLS-1$
			writer.writeAttribute("id", controlId+"__lnk__"+i, null);
			writer.writeText(val, null);
			writer.endElement("a");
			if (renderLink) {
				setupSubmitOnClick(context, pager, st, controlId + "__lnk__" + i, controlId + "__lnk__" + i); // $NON-NLS-1$
			}
		}

		writer.endElement("li");
	}

	// Encode after the pages
	if (!pager.isAlwaysCalculateLast()) {
		if (end < st.getLastPage() || st.hasMoreRows()) {
			writer.startElement("li", null);
			writer.writeAttribute("class", "disabled", null);
			writer.startElement("a", control); //$NON-NLS-1$
			writer.writeText(getMayBeMorePages(), null);
			writer.endElement("a");
			writer.endElement("li");
		}
	}

	// Restore the old page value
	if (oldPage != null) {
		requestMap.put(VAR_PAGE, oldPage);
	} else {
		requestMap.remove(VAR_PAGE);
	}

}
 
开发者ID:jesse-gallagher,项目名称:Miscellany,代码行数:59,代码来源:AcePagerRenderer.java

示例11: createImplicitObjects

import com.ibm.xsp.util.TypedUtil; //导入方法依赖的package包/类
public void createImplicitObjects(FacesContextEx context) {
	Map<String, Object> localMap = TypedUtil.getRequestMap(context.getExternalContext());
	localMap.put("server", new ImplicitObject());
}
 
开发者ID:OpenNTF,项目名称:BuildAndTestPattern4Xpages,代码行数:5,代码来源:ImplicitObjectFactory.java

示例12: createImplicitObjects

import com.ibm.xsp.util.TypedUtil; //导入方法依赖的package包/类
@Override
public void createImplicitObjects(FacesContextEx context) {
       Map<String, Object> requestMap = TypedUtil.getRequestMap(context.getExternalContext());
       createXspContext(context, requestMap);
}
 
开发者ID:OpenNTF,项目名称:XPagesExtensionLibrary,代码行数:6,代码来源:BluemixContextImplicitObjectFactory.java

示例13: createImplicitObjects

import com.ibm.xsp.util.TypedUtil; //导入方法依赖的package包/类
@SuppressWarnings({ "rawtypes", "unchecked" })
public void createImplicitObjects(FacesContextEx paramFacesContextEx) {
	Map localMap = TypedUtil.getRequestMap(paramFacesContextEx.getExternalContext());
	localMap.put("server", new ImplicitObject());
}
 
开发者ID:OpenNTF,项目名称:xsp.extlib,代码行数:6,代码来源:ImplicitObjectFactory.java


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