Save This Page
Home » struts-1.3.9-src » org.apache.struts » tiles » [javadoc | source]
org.apache.struts.tiles
public class: TilesUtil [javadoc | source]
java.lang.Object
   org.apache.struts.tiles.TilesUtil

Direct Known Subclasses:
    DefinitionsUtil

Class containing utility methods for Tiles. Methods of this class are static and thereby accessible from anywhere. The underlying implementation can be changed with #setTilesUtil(TilesUtilImpl) .
Real implementation classes should derive from the TilesUtilImpl class.
Some methods are specified to throw the UnsupportedOperationException if the underlying implementation doesn't support the operation.
Field Summary
protected static  Log log    Commons Logging instance. 
protected static  TilesUtilImpl tilesUtilImpl    The implementation of tilesUtilImpl 
Method from org.apache.struts.tiles.TilesUtil Summary:
createDefinitionsFactory,   doForward,   doInclude,   doInclude,   getDefinition,   getDefinitionsFactory,   getTilesUtil,   isTilesUtilImplSet,   setTilesUtil,   testReset
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.struts.tiles.TilesUtil Detail:
 public static DefinitionsFactory createDefinitionsFactory(ServletContext servletContext,
    DefinitionsFactoryConfig factoryConfig) throws DefinitionsFactoryException 
    Create Definition factory from specified configuration object. Create a ConfigurableDefinitionsFactory and initialize it with the configuration object. This later can contain the factory classname to use. Factory is made accessible from tags.

    Fallback of several factory creation methods.

 public static  void doForward(String uri,
    HttpServletRequest request,
    HttpServletResponse response,
    ServletContext servletContext) throws IOException, ServletException 
    Do a forward using request dispatcher. This method is used by the Tiles package anytime a forward is required.
 public static  void doInclude(String uri,
    PageContext pageContext) throws IOException, ServletException 
    Do an include using PageContext.include(). This method is used by the Tiles package when an include is required. The Tiles package can use indifferently any form of this method.
 public static  void doInclude(String uri,
    HttpServletRequest request,
    HttpServletResponse response,
    ServletContext servletContext) throws IOException, ServletException 
    Do an include using request dispatcher. This method is used by the Tiles package when an include is required. The Tiles package can use indifferently any form of this method.
 public static ComponentDefinition getDefinition(String definitionName,
    ServletRequest request,
    ServletContext servletContext) throws FactoryNotFoundException, DefinitionsFactoryException 
    Get a definition by its name. First, retrieve definition factory and then get requested definition. Throw appropriate exception if definition or definition factory is not found.
 public static DefinitionsFactory getDefinitionsFactory(ServletRequest request,
    ServletContext servletContext) 
    Get definition factory from appropriate servlet context.
 public static TilesUtilImpl getTilesUtil() 
    Get the real implementation.
 static boolean isTilesUtilImplSet() 
    Getter to know if the underlying implementation is already set to another value than the default value.
 public static  void setTilesUtil(TilesUtilImpl tilesUtil) 
    Set the real implementation. This method should be called only once. Successive calls have no effect.
 protected static  void testReset() 
    Reset internal state. This method is used by test suites to reset the class to its original state.