Package org.apache.struts.tiles

Examples of org.apache.struts.tiles.ComponentDefinitionsFactory


        }

        // Try to create from classname
        try {
            Class factoryClass = RequestUtils.applicationClass(classname);
            ComponentDefinitionsFactory factory =
                (ComponentDefinitionsFactory) factoryClass.newInstance();
            factory.initFactory(servletContext, properties);
            return factory;

        } catch (ClassCastException ex) { // Bad classname
            throw new DefinitionsFactoryException(
                "Error - createDefinitionsFactory : Factory class '"
View Full Code Here


    public ComponentDefinitionsFactory createDefaultFactory(
        ServletContext servletContext,
        Map properties)
        throws DefinitionsFactoryException {

        ComponentDefinitionsFactory factory =
            new I18nFactorySet(servletContext, properties);

        return factory;
    }
View Full Code Here

     * @throws DefinitionsFactoryException If factory creation fails.
     */
    public void reload(ServletContext servletContext)
        throws DefinitionsFactoryException {

        ComponentDefinitionsFactory newInstance =
            createFactory(servletContext, properties);

        factory = newInstance;
    }
View Full Code Here

    public void setConfig(
        DefinitionsFactoryConfig config,
        ServletContext servletContext)
        throws DefinitionsFactoryException {

        ComponentDefinitionsFactory newFactory =
            createFactoryInstance(config.getFactoryClassname());

        newFactory.initFactory(servletContext, createConfigMap(config));
        factory = newFactory;
    }
View Full Code Here

        response.setContentType("text/plain");
        PrintWriter writer = response.getWriter();

        try {
          ServletContext context = getServlet().getServletContext();
            ComponentDefinitionsFactory factory = DefinitionsUtil.getDefinitionsFactory(context );
            writer.println( factory );
        } catch (Exception e) {
            writer.println("FAIL - " + e.toString());
            getServlet().log("ReloadAction", e);
        }
View Full Code Here

    /**
     * Do start tag
     */
  public int doStartTag() throws JspException
  {
  ComponentDefinitionsFactory factory = DefinitionsUtil.getDefinitionsFactory(pageContext);
  if(factory != null )
    return SKIP_BODY;

  Map properties = new HashMap();
    // Read properties
View Full Code Here

    // Try to create from classname
  try
    {
    Class factoryClass = Class.forName(classname);
    ComponentDefinitionsFactory factory = (ComponentDefinitionsFactory)factoryClass.newInstance();
    factory.initFactory( servletContext, properties);
    return factory;
    }
   catch( ClassCastException ex )
    { // Bad classname
    throw new DefinitionsFactoryException( "Error - createDefinitionsFactory : Factory class '"
View Full Code Here

   * @throw DefinitionsFactoryException If an error occur while initializing factory
   */
  public ComponentDefinitionsFactory createDefaultFactory(ServletContext servletContext, Map properties)
    throws DefinitionsFactoryException
  {
    ComponentDefinitionsFactory factory = new I18nFactorySet(servletContext, properties); ;
    return factory;
  }
View Full Code Here

   * @throws DefinitionsFactoryException If factory creation fail.
   */
  public void reload(ServletContext servletContext)
    throws DefinitionsFactoryException
  {
  ComponentDefinitionsFactory newInstance = createFactory( servletContext, properties);
  factory = newInstance;
  }
View Full Code Here

     */
  public void setConfig(DefinitionsFactoryConfig config, ServletContext servletContext)
    throws DefinitionsFactoryException
  {
    // create a new factory and initialize it
  ComponentDefinitionsFactory newFactory = createFactoryInstance( config.getFactoryClassname());
  newFactory.initFactory(servletContext, createConfigMap(config));
  factory = newFactory;
  }
View Full Code Here

TOP

Related Classes of org.apache.struts.tiles.ComponentDefinitionsFactory

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.