Save This Page
Home » tiles-2.0.6-src » org.apache.tiles.jsp » taglib » [javadoc | source]
    1   /*
    2    * $Id: InsertDefinitionTag.java 527536 2007-04-11 15:44:51Z apetrelli $
    3    *
    4    * Licensed to the Apache Software Foundation (ASF) under one
    5    * or more contributor license agreements.  See the NOTICE file
    6    * distributed with this work for additional information
    7    * regarding copyright ownership.  The ASF licenses this file
    8    * to you under the Apache License, Version 2.0 (the
    9    * "License"); you may not use this file except in compliance
   10    * with the License.  You may obtain a copy of the License at
   11    *
   12    * http://www.apache.org/licenses/LICENSE-2.0
   13    *
   14    * Unless required by applicable law or agreed to in writing,
   15    * software distributed under the License is distributed on an
   16    * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
   17    * KIND, either express or implied.  See the License for the
   18    * specific language governing permissions and limitations
   19    * under the License.
   20    */
   21   
   22   package org.apache.tiles.jsp.taglib;
   23   
   24   import org.apache.tiles.TilesException;
   25   
   26   import javax.servlet.jsp.JspException;
   27   
   28   /**
   29    * This is the tag handler for <tiles:insertDefinition>, which includes a
   30    * name, eventually overriding or filling attributes of its template.
   31    *
   32    * @version $Rev: 527536 $ $Date: 2007-04-11 17:44:51 +0200 (Wed, 11 Apr 2007) $
   33    */
   34   public class InsertDefinitionTag extends RenderTagSupport implements PutAttributeTagParent {
   35   
   36       /**
   37        * The definition name.
   38        */
   39       private String name;
   40   
   41   
   42       /**
   43        * Returns the name of the definition to insert.
   44        *
   45        * @return The name of the definition.
   46        */
   47       public String getName() {
   48           return name;
   49       }
   50   
   51       /**
   52        * Sets the name of the definition to insert.
   53        *
   54        * @param name The name of the definition.
   55        */
   56       public void setName(String name) {
   57           this.name = name;
   58       }
   59   
   60   
   61       /** {@inheritDoc} */
   62       protected void render() throws JspException, TilesException {
   63           container.render(name, pageContext);
   64       }
   65   }

Save This Page
Home » tiles-2.0.6-src » org.apache.tiles.jsp » taglib » [javadoc | source]