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


Java TableTag类代码示例

本文整理汇总了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);
}
 
开发者ID:mtpettyp,项目名称:openreports,代码行数:12,代码来源:MockDisplayTablePageContext.java

示例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;
}
 
开发者ID:webbfontaine,项目名称:displaytag,代码行数:39,代码来源:DisplayTagSpringInterceptor.java

示例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);
}
 
开发者ID:webbfontaine,项目名称:displaytag,代码行数:35,代码来源:ResponseOverrideFilter.java


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