本文整理了Java中org.apache.tiles.request.Request.getApplicationContext
方法的一些代码示例,展示了Request.getApplicationContext
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getApplicationContext
方法的具体详情如下:
包路径:org.apache.tiles.request.Request
类名称:Request
方法名:getApplicationContext
[英]Returns the associated application context.
[中]返回关联的应用程序上下文。
代码示例来源:origin: org.apache.tiles/tiles-ognl
/** {@inheritDoc} */
public ApplicationContext getNestedObject(Request obj) {
return obj.getApplicationContext();
}
}
代码示例来源:origin: org.apache.tiles/tiles-request-api
/** {@inheritDoc} */
public ApplicationContext getApplicationContext() {
return context.getApplicationContext();
}
代码示例来源:origin: org.springframework.webflow/spring-webflow
ApplicationContext tilesAppContext = tilesRequest.getApplicationContext();
BasicTilesContainer container = (BasicTilesContainer) TilesAccess.getContainer(tilesAppContext);
代码示例来源:origin: org.apache.tiles/tiles-el
/** {@inheritDoc} */
public Object evaluate(String expression, Request request) {
ELContextImpl context = new ELContextImpl(resolver);
context.putContext(Request.class, request);
context.putContext(ApplicationContext.class,
request.getApplicationContext());
ValueExpression valueExpression = expressionFactory
.createValueExpression(context, expression, Object.class);
return valueExpression.getValue(context);
}
}
代码示例来源:origin: org.apache.tiles/tiles-api
/**
* Returns the current container that has been set, or the default one.
*
* @param request The request to use.
* @return The current Tiles container to use in web pages.
* @since 2.1.0
*/
public static TilesContainer getCurrentContainer(Request request) {
ApplicationContext context = request.getApplicationContext();
Map<String, Object> requestScope = request.getContext("request");
TilesContainer container = (TilesContainer) requestScope.get(CURRENT_CONTAINER_ATTRIBUTE_NAME);
if (container == null) {
container = getContainer(context);
requestScope.put(CURRENT_CONTAINER_ATTRIBUTE_NAME, container);
}
return container;
}
}
代码示例来源:origin: org.apache.tiles/tiles-api
/**
* Sets the current container to use in web pages.
*
* @param request The request to use.
* @param key The key under which the container is stored.
* @since 2.1.0
*/
public static void setCurrentContainer(Request request,
String key) {
ApplicationContext applicationContext = request.getApplicationContext();
TilesContainer container = getContainer(applicationContext, key);
if (container != null) {
request.getContext("request").put(CURRENT_CONTAINER_ATTRIBUTE_NAME, container);
} else {
throw new NoSuchContainerException("The container with the key '"
+ key + "' cannot be found");
}
}
代码示例来源:origin: org.n52.metadata/smarteditor-api
protected void fallbackModelRenderer(
Map<String, Object> model, HttpServletRequest request, HttpServletResponse response) throws Exception {
Request tilesRequest = super.createTilesRequest(request, response);
ApplicationContext applicationContext = tilesRequest.getApplicationContext();
TilesContainer container = TilesAccess.getContainer(applicationContext);
if (container == null) {
throw new ServletException("Tiles container is not initialized. " +
"Have you added a TilesConfigurer to your web application context?");
}
exposeModelAsRequestAttributes(model, request);
JstlUtils.exposeLocalizationContext(new RequestContext(request, getServletContext()));
Definition definition = container.getDefinition(getUrl(), tilesRequest);
container.render(definition, tilesRequest);
}
}
代码示例来源:origin: spring-projects/spring-webflow
ApplicationContext tilesAppContext = tilesRequest.getApplicationContext();
BasicTilesContainer container = (BasicTilesContainer) TilesAccess.getContainer(tilesAppContext);
代码示例来源:origin: org.springframework.webflow/spring-js
ApplicationContext tilesAppContext = tilesRequest.getApplicationContext();
BasicTilesContainer container = (BasicTilesContainer) TilesAccess.getContainer(tilesAppContext);
内容来源于网络,如有侵权,请联系作者删除!