| <?xml version="1.0" encoding="ISO-8859-1" ?> |
| <!-- |
| /* |
| * $Id$ |
| * |
| * Licensed to the Apache Software Foundation (ASF) under one |
| * or more contributor license agreements. See the NOTICE file |
| * distributed with this work for additional information |
| * regarding copyright ownership. The ASF licenses this file |
| * to you under the Apache License, Version 2.0 (the |
| * "License"); you may not use this file except in compliance |
| * with the License. You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, |
| * software distributed under the License is distributed on an |
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| * KIND, either express or implied. See the License for the |
| * specific language governing permissions and limitations |
| * under the License. |
| */ |
| --> |
| |
| <!DOCTYPE tiles-definitions PUBLIC |
| "-//Apache Software Foundation//DTD Tiles Configuration 2.1//EN" |
| "http://tiles.apache.org/dtds/tiles-config_2_1.dtd"> |
| |
| <!-- Definitions for Tiles documentation --> |
| |
| <tiles-definitions> |
| |
| <!-- ======================================================= --> |
| <!-- Master definition --> |
| <!-- ======================================================= --> |
| |
| <!-- Doc index page description --> |
| <definition name="test.inner.definition" template="/layout.jsp"> |
| <put-attribute name="title" value="This is a configured inner definition."/> |
| <put-attribute name="header" value="/header.jsp"/> |
| <put-attribute name="body" value="/body.jsp"/> |
| </definition> |
| |
| <definition name="test.definition" template="/layout.jsp"> |
| <put-attribute name="title" value="This is the title."/> |
| <put-attribute name="header" value="/header.jsp"/> |
| <put-attribute name="body" value="/body.jsp"/> |
| </definition> |
| |
| <definition name="test.definition.ignore" template="/layout_ignore.jsp"> |
| <put-attribute name="title" value="This is the title."/> |
| <put-attribute name="body" value="/body.jsp"/> |
| </definition> |
| |
| <definition name="test.definition.freemarker" template="/layout.ftl"> |
| <put-attribute name="title" value="This is the title."/> |
| <put-attribute name="header" value="/header.jsp"/> |
| <put-attribute name="body" value="/body.jsp"/> |
| </definition> |
| |
| <definition name="test.definition.flush" template="/layout_flush.jsp"> |
| <put-attribute name="title" value="This is the title."/> |
| <put-attribute name="header" value="/header.jsp"/> |
| <put-attribute name="body" value="/body.jsp"/> |
| </definition> |
| |
| <definition name="test.definition.exception" template="/layout.jsp"> |
| <put-attribute name="title" value="This is the title."/> |
| <put-attribute name="header" value="/exception.jsp"/> |
| <put-attribute name="body" value="/body.jsp"/> |
| </definition> |
| |
| <definition name="test.composite.definition" template="/layout.jsp"> |
| <put-attribute name="title" value="This is a configured composite definition."/> |
| <put-attribute name="header" value="/header.jsp"/> |
| <put-attribute name="body" value="test.inner.definition"/> |
| </definition> |
| |
| <definition name="test.putAttributes" template="/putattributeslayout.jsp"> |
| <put-attribute name="stringTest" value="This is a string" type="string" /> |
| <put-list-attribute name="list"> |
| <add-attribute value="valueOne" type="string" /> |
| <add-attribute value="valueTwo" type="string" /> |
| <add-attribute value="valueThree" type="string" /> |
| </put-list-attribute> |
| </definition> |
| |
| <definition name="test.putAttributes.inherit" extends="test.putAttributes"> |
| <put-list-attribute name="list" inherit="true"> |
| <add-attribute value="valueFour" type="string" /> |
| </put-list-attribute> |
| </definition> |
| |
| <definition name="test.putAttributes.inherit" extends="test.putAttributes"> |
| <put-list-attribute name="list" inherit="true"> |
| <add-attribute value="valueFour" type="string" /> |
| </put-list-attribute> |
| </definition> |
| |
| <definition name="test.putAttributes.inherit" extends="test.putAttributes"> |
| <put-list-attribute name="list" inherit="true"> |
| <add-attribute value="valueFour" type="string" /> |
| </put-list-attribute> |
| </definition> |
| |
| <definition name="test.putAllAttributes" template="/putallattributeslayout.jsp"> |
| <put-attribute name="one" value="There should be three more strings" type="string" /> |
| <put-attribute name="two" value="One" type="string" /> |
| <put-attribute name="three" value="Two" type="string" /> |
| <put-attribute name="four" value="Three" type="string" /> |
| </definition> |
| |
| <definition name="preparer.definition" template="/layout.jsp"> |
| <put-attribute name="title" value="This is the title."/> |
| <put-attribute name="header" value="/header.jsp"/> |
| </definition> |
| |
| <definition name="testdispatchservlet" extends="test.definition"/> |
| |
| <definition name="preparer.definition.configured" extends="preparer.definition" preparer="org.apache.tiles.test.preparer.TestViewPreparer" /> |
| |
| <definition name="test.localized.definition" template="/layout.jsp"> |
| <put-attribute name="title" value="Default locale" /> |
| <put-attribute name="header" value="/header.jsp" /> |
| <put-attribute name="body" value="/defaultlocale.jsp" /> |
| </definition> |
| |
| <definition name="test.definition.appears" extends="test.definition"> |
| <put-attribute name="title" value="This definition appears."/> |
| </definition> |
| |
| <definition name="test.definition.does_not_appear" extends="test.definition"> |
| <put-attribute name="title" value="This definition does |
| not appear."/> |
| </definition> |
| |
| <definition name="test.definition.appears.configured" |
| extends="test.definition.appears" role="goodrole" /> |
| |
| <definition name="test.definition.does_not_appear.configured" |
| extends="test.definition.does_not_appear" role="badrole" /> |
| |
| <definition name="test.definition.roles" template="/layout.jsp"> |
| <put-attribute name="title" value="This is the title."/> |
| <put-attribute name="header" value="/header.jsp" role="goodrole" /> |
| <put-attribute name="body" value="/body.jsp" role="badrole" /> |
| </definition> |
| |
| <definition name="test.definition.roles.tags" template="/layout_roles.jsp"> |
| <put-attribute name="title" value="This is the title."/> |
| <put-attribute name="header" value="/header.jsp" /> |
| <put-attribute name="body" value="/body.jsp" /> |
| </definition> |
| |
| <!-- Tests for cascaded attributes --> |
| <definition name="test.overridden.cascaded.definition" template="/layout.jsp"> |
| <put-attribute name="title" value="This is the title." cascade="true" /> |
| <put-attribute name="header" value="/alternate-header.jsp" cascade="true"/> |
| <put-attribute name="body" value="test.inner.definition"/> |
| </definition> |
| |
| <definition name="test.inner.cascadable.definition" template="/layout.jsp"> |
| <put-attribute name="body" value="/body.jsp"/> |
| </definition> |
| |
| <definition name="test.cascaded.definition" template="/layout.jsp"> |
| <put-attribute name="title" value="This is the title." cascade="true" /> |
| <put-attribute name="header" value="/header.jsp" cascade="true"/> |
| <put-attribute name="body" value="test.inner.cascadable.definition"/> |
| </definition> |
| |
| <definition name="test.cascaded.template.definition" template="/layout.jsp"> |
| <put-attribute name="title" value="This is the title." cascade="true" /> |
| <put-attribute name="header" value="/header.jsp" cascade="true"/> |
| <put-attribute name="body" value="/layout_nobody.jsp"/> |
| </definition> |
| |
| <definition name="test.cascaded.list.definition" template="/layout.jsp"> |
| <put-attribute name="title" value="This is the title." cascade="true" /> |
| <put-attribute name="header" value="/header.jsp" cascade="true"/> |
| <put-attribute name="body" value="/putattributeslayout.jsp"/> |
| <put-attribute name="stringTest" value="This is a string" type="string" cascade="true" /> |
| <put-list-attribute name="list" cascade="true"> |
| <add-attribute value="valueOne" type="string" /> |
| <add-attribute value="valueTwo" type="string" /> |
| <add-attribute value="valueThree" type="string" /> |
| </put-list-attribute> |
| </definition> |
| |
| <definition name="test.reversed.definition" template="/layout_alt_title.jsp"> |
| <put-attribute name="title" value="This is the title." type="reversed"/> |
| <put-attribute name="header" value="/header.jsp"/> |
| <put-attribute name="body" value="/body.jsp"/> |
| </definition> |
| |
| <definition name="test.nesting.definitions" template="/layout.jsp"> |
| <put-attribute name="title" value="This is the title."/> |
| <put-attribute name="header" value="/header.jsp"/> |
| <put-attribute name="body"> |
| <definition template="/layout.jsp"> |
| <put-attribute name="title" value="This is a nested definition."/> |
| <put-attribute name="header" value="/header.jsp"/> |
| <put-attribute name="body" value="/body.jsp"/> |
| </definition> |
| </put-attribute> |
| </definition> |
| |
| <definition name="test.nesting.list.definitions" template="/layout_list.jsp"> |
| <put-attribute name="title" value="This is the title."/> |
| <put-attribute name="header" value="/header.jsp"/> |
| <put-list-attribute name="list"> |
| <add-attribute> |
| <definition template="/layout.jsp"> |
| <put-attribute name="title" value="This is a nested definition."/> |
| <put-attribute name="header" value="/header.jsp"/> |
| <put-attribute name="body" value="/body.jsp"/> |
| </definition> |
| </add-attribute> |
| </put-list-attribute> |
| </definition> |
| |
| <definition name="test.composite.el.definition" templateExpression="${layout}" |
| preparer="org.apache.tiles.test.preparer.RequestSettingViewPreparer"> |
| <put-attribute name="title" value="This is a configured composite definition."/> |
| <put-attribute name="header" value="/header.jsp"/> |
| <put-attribute name="body" expression="${requestScope.body}"/> |
| </definition> |
| |
| <definition name="test.composite.mvel.definition" templateExpression="MVEL:layout" |
| preparer="org.apache.tiles.test.preparer.RequestSettingViewPreparer"> |
| <put-attribute name="title" value="This is a configured composite definition."/> |
| <put-attribute name="header" value="/header.jsp"/> |
| <put-attribute name="body" expression="MVEL:requestScope.body"/> |
| </definition> |
| |
| <definition name="test.composite.ognl.definition" templateExpression="OGNL:layout" |
| preparer="org.apache.tiles.test.preparer.RequestSettingViewPreparer"> |
| <put-attribute name="title" value="This is a configured composite definition."/> |
| <put-attribute name="header" value="/header.jsp"/> |
| <put-attribute name="body" expression="OGNL:requestScope.body"/> |
| </definition> |
| |
| <definition name="test.composite.el.doNotShow.definition" templateExpression="${layout}" |
| preparer="org.apache.tiles.test.preparer.RequestSettingViewPreparer"> |
| <put-attribute name="title" value="This is a configured definition."/> |
| <put-attribute name="header" value="/header.jsp"/> |
| <put-attribute name="body" expression="${requestScope.doNotShowBody}"/> |
| </definition> |
| |
| <definition name="test.definition.attribute.preparer" template="/layout_preparer.jsp"> |
| <put-attribute name="title" value="This is the title."/> |
| <put-attribute name="header" value="/header.jsp"/> |
| </definition> |
| |
| <definition name="test.openbody.definition" template="/layout_closebody.jsp"> |
| <put-attribute name="title" value="This is the title."/> |
| <put-attribute name="header" value="/header.jsp"/> |
| <put-attribute name="body" value="/layout.jsp" /> |
| </definition> |
| |
| <definition name="test.defaultvalues.definition" template="/layout_default.jsp"> |
| <put-attribute name="title" value="This is the title."/> |
| </definition> |
| </tiles-definitions> |