Package org.displaytag.util

Examples of org.displaytag.util.ParamEncoder


  public static int getCurrentPage4Id(String idParam) {
    if (logger.isDebugEnabled()) {
      logger.debug("getCurrentPage4Id(String idParam=" + idParam + ") - start");
    }
   
    ParamEncoder encoder = new ParamEncoder(idParam);
    String encodedParam = encoder.encodeParameterName("p");
    if (logger.isDebugEnabled()) {
      logger.debug("getCurrentPage4Id(String) - encodedParam=" + encodedParam);
    }
   
    HttpServletRequest request = ServletActionContext.getRequest();
View Full Code Here


  private MockHttpServletResponse response = new MockHttpServletResponse()
  private MockServletContext servletContext = new MockServletContext();
 
  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)
View Full Code Here

     */
    @Override
    @Test
    public void doTest() throws Exception
    {
        ParamEncoder encoder = new ParamEncoder("table");
        String mediaParameter = encoder.encodeParameterName(TableTagParameters.PARAMETER_EXPORTTYPE);

        WebRequest request = new GetMethodWebRequest(getJspUrl(getJspName()));
        request.setParameter(mediaParameter, Integer.toString(this.getCode()));

        WebResponse response = runner.getResponse(request);
View Full Code Here

    @Override
    @Test
    public void doTest() throws Exception
    {
        WebRequest request = new GetMethodWebRequest(getJspUrl(getJspName()));
        ParamEncoder encoder = new ParamEncoder("table");
        request.setParameter(encoder.encodeParameterName(TableTagParameters.PARAMETER_PAGE), "3");
        request.setParameter(encoder.encodeParameterName(TableTagParameters.PARAMETER_SORT), "0");
        request.setParameter(encoder.encodeParameterName(TableTagParameters.PARAMETER_ORDER), "1");

        WebResponse response = runner.getResponse(request);

        checkResponse(response);
View Full Code Here

    @Test
    public void doTest() throws Exception
    {
        WebRequest request = new GetMethodWebRequest(getJspUrl(getJspName()));

        ParamEncoder encoder = new ParamEncoder("table");
        request.setParameter(encoder.encodeParameterName(TableTagParameters.PARAMETER_PAGE), "5");
        request.setParameter("pagesize", "1");

        checkLastColumn(request);

        request = new GetMethodWebRequest(getJspUrl(getJspName()));

        request.setParameter(encoder.encodeParameterName(TableTagParameters.PARAMETER_PAGE), "10");
        request.setParameter("pagesize", "2");

        checkLastColumn(request);

    }
View Full Code Here

    {
        // test keep
        WebRequest request = new GetMethodWebRequest(getJspUrl(getJspName()));

        // test remove
        ParamEncoder encoder = new ParamEncoder("table");
        String mediaParameter = encoder.encodeParameterName(TableTagParameters.PARAMETER_EXPORTTYPE);
        request.setParameter(mediaParameter, Integer.toString(MediaTypeEnum.XML.getCode()));

        // this will enable the filter!
        request.setParameter(TableTagParameters.PARAMETER_EXPORTING, "1");
View Full Code Here

    @Override
    @Test
    public void doTest() throws Exception
    {
        WebRequest request = new GetMethodWebRequest(getJspUrl(getJspName()));
        ParamEncoder encoder = new ParamEncoder("table");
        request.setParameter(encoder.encodeParameterName(TableTagParameters.PARAMETER_PAGE), "3");

        WebResponse response = runner.getResponse(request);

        if (log.isDebugEnabled())
        {
View Full Code Here

    @Override
    @Test
    public void doTest() throws Exception
    {
        WebRequest request = new GetMethodWebRequest(getJspUrl(getJspName()));
        ParamEncoder encoder = new ParamEncoder("table");
        request.setParameter(encoder.encodeParameterName(TableTagParameters.PARAMETER_ORDER), "2");
        request.setParameter(encoder.encodeParameterName(TableTagParameters.PARAMETER_SORT), "0");

        WebResponse response = runner.getResponse(request);

        if (log.isDebugEnabled())
        {
View Full Code Here

    public void doTest() throws Exception
    {
        WebRequest request = new GetMethodWebRequest(getJspUrl(getJspName()));
        WebResponse response = runner.getResponse(request);

        ParamEncoder encoder = new ParamEncoder("table");
        request.setParameter(encoder.encodeParameterName(TableTagParameters.PARAMETER_PAGE), "2");

        if (log.isDebugEnabled())
        {
            log.debug(response.getText());
        }
View Full Code Here

    @Test
    public void doTest() throws Exception
    {
        WebRequest request = new GetMethodWebRequest(getJspUrl(getJspName()));

        ParamEncoder encoder = new ParamEncoder("table");
        String pageParameter = encoder.encodeParameterName(TableTagParameters.PARAMETER_PAGE);
        request.setParameter(pageParameter, "2");

        WebResponse response = runner.getResponse(request);

        if (log.isDebugEnabled())
View Full Code Here

TOP

Related Classes of org.displaytag.util.ParamEncoder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.