本文整理汇总了Java中org.displaytag.tags.TableTag类的典型用法代码示例。如果您正苦于以下问题:Java TableTag类的具体用法?Java TableTag怎么用?Java TableTag使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TableTag类属于org.displaytag.tags包,在下文中一共展示了TableTag类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: MockDisplayTablePageContext
import org.displaytag.tags.TableTag; //导入依赖的package包/类
public MockDisplayTablePageContext(String exportType, ApplicationContext applicationContext)
{
request.setupAddParameter(new ParamEncoder(null).encodeParameterName(TableTagParameters.PARAMETER_EXPORTTYPE), exportType);
HashMap<String,String> map = new HashMap<String,String>();
map.put(TableTagParameters.BEAN_BUFFER, "placeholder");
request.setAttribute(TableTag.FILTER_CONTENT_OVERRIDE_BODY, map);
servletContext.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, applicationContext);
}
示例2: preHandle
import org.displaytag.tags.TableTag; //导入依赖的package包/类
/**
* @see HandlerInterceptor#preHandle(HttpServletRequest,HttpServletResponse, Object)
*/
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception
{
if (request.getParameter(TableTagParameters.PARAMETER_EXPORTING) == null)
{
if (log.isDebugEnabled())
{
log.debug(Messages.getString("ResponseOverrideFilter.parameternotfound")); //$NON-NLS-1$
}
// don't intercept!
return true;
}
BufferedResponseWrapper wrapper = new BufferedResponseWrapper13Impl(response);
Map<String, Boolean> contentBean = new HashMap<String, Boolean>(4);
if (buffer)
{
contentBean.put(TableTagParameters.BEAN_BUFFER, Boolean.TRUE);
}
request.setAttribute(TableTag.FILTER_CONTENT_OVERRIDE_BODY, contentBean);
if (log.isDebugEnabled())
{
log.debug("handler is " + handler);
}
HandlerAdapter handlerAdaptor = new SimpleControllerHandlerAdapter();
handlerAdaptor.handle(request, wrapper, handler);
ExportDelegate.writeExport(response, request, wrapper);
return false;
}
示例3: doFilter
import org.displaytag.tags.TableTag; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain)
throws IOException, ServletException
{
if (servletRequest.getParameter(TableTagParameters.PARAMETER_EXPORTING) == null)
{
if (log.isDebugEnabled())
{
log.debug(Messages.getString("ResponseOverrideFilter.parameternotfound")); //$NON-NLS-1$
}
// don't filter!
filterChain.doFilter(servletRequest, servletResponse);
return;
}
HttpServletRequest request = (HttpServletRequest) servletRequest;
BufferedResponseWrapper wrapper = new BufferedResponseWrapper13Impl((HttpServletResponse) servletResponse);
Map<String, Boolean> contentBean = new HashMap<String, Boolean>(4);
if (buffer)
{
contentBean.put(TableTagParameters.BEAN_BUFFER, Boolean.TRUE);
}
request.setAttribute(TableTag.FILTER_CONTENT_OVERRIDE_BODY, contentBean);
filterChain.doFilter(request, wrapper);
ExportDelegate.writeExport((HttpServletResponse) servletResponse, servletRequest, wrapper);
}