Save This Page
Home » struts-2.1.8.1-src » org.apache » struts2 » views » tiles » [javadoc | source]
org.apache.struts2.views.tiles
public class: TilesResult [javadoc | source]
java.lang.Object
   org.apache.struts2.dispatcher.StrutsResultSupport
      org.apache.struts2.dispatcher.ServletDispatcherResult
         org.apache.struts2.views.tiles.TilesResult

All Implemented Interfaces:
    com.opensymphony.xwork2.Result, StrutsStatics

Renders a view using struts-tiles. In your web.xml file, you need to add a servlet entry for TilesServlet to load the tiles definitions into the ServletContext. <servlet> <servlet-name>tiles</servlet-name> <servlet-class>org.apache.tiles.servlets.TilesServlet</servlet-class> <init-param> <param-name>definitions-config</param-name> <param-value>/WEB-INF/tiles-config.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> In struts.xml, use type="tiles" on your <result>. <action name="editUser" class="userAction" method="edit"> <result name="success" type="tiles">userForm</result> <result name="input" type="tiles">userList</result> </action> Making this result type the default for the current package. <result-types> <result-type name="tiles" class="org.apache.struts2.views.tiles.TilesResult" default="true" /> </result-types>
Fields inherited from org.apache.struts2.dispatcher.StrutsResultSupport:
DEFAULT_PARAM
Constructor:
 public TilesResult() 
 public TilesResult(String location) 
Method from org.apache.struts2.views.tiles.TilesResult Summary:
doExecute
Methods from org.apache.struts2.dispatcher.ServletDispatcherResult:
doExecute
Methods from org.apache.struts2.dispatcher.StrutsResultSupport:
conditionalParse,   doExecute,   execute,   getLastFinalLocation,   getLocation,   setEncode,   setLocation,   setParse
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.struts2.views.tiles.TilesResult Detail:
 public  void doExecute(String location,
    ActionInvocation invocation) throws Exception 
    Dispatches to the given location. Does its forward via a RequestDispatcher. If the dispatch fails a 404 error will be sent back in the http response.