Examples of TilesRequestContextFactory


Examples of org.apache.tiles.context.TilesRequestContextFactory

    assertEquals("/WEB-INF/search.jsp", response.getIncludedUrls().get(0));
    assertEquals("/WEB-INF/searchNavigation.jsp", response.getIncludedUrls().get(1));
  }

  public void testFlattenAttributeMap() throws Exception {
    TilesRequestContextFactory tilesRequestContextFactory = new ServletTilesRequestContextFactory();
    tilesRequestContextFactory.init(new HashMap<String, String>());
    BasicTilesContainer container = (BasicTilesContainer) ServletUtil.getCurrentContainer(request, servletContext);
    TilesRequestContext tilesRequestContext = tilesRequestContextFactory.createRequestContext(
        container.getApplicationContext(), new Object[] { request, response });
    Definition compositeDefinition = container.getDefinitionsFactory().getDefinition("search", tilesRequestContext);
    Map<String, Attribute> resultMap = new HashMap<String, Attribute>();
    ajaxTilesView.flattenAttributeMap(container, tilesRequestContext, resultMap, compositeDefinition, request,
        response);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.