Author: apetrelli
Date: Fri Sep 19 11:17:29 2008
New Revision: 697173

URL: http://svn.apache.org/viewvc?rev=697173&view=rev
Log:
TILES-293
Added documentation for wildcards.

Added:
    tiles/framework/trunk/src/site/apt/tutorial/advanced/wildcard.apt
Modified:
    tiles/framework/trunk/src/site/apt/tutorial/advanced/index.apt
    tiles/framework/trunk/src/site/apt/tutorial/index.apt
    tiles/framework/trunk/src/site/site.xml

Modified: tiles/framework/trunk/src/site/apt/tutorial/advanced/index.apt
URL: 
http://svn.apache.org/viewvc/tiles/framework/trunk/src/site/apt/tutorial/advanced/index.apt?rev=697173&r1=697172&r2=697173&view=diff
==============================================================================
--- tiles/framework/trunk/src/site/apt/tutorial/advanced/index.apt (original)
+++ tiles/framework/trunk/src/site/apt/tutorial/advanced/index.apt Fri Sep 19 
11:17:29 2008
@@ -42,3 +42,6 @@
   [[7]] {{{beans.html}Using Beans as attributes}}
   
   [[8]] {{{menu.html}Menu-ing support}}
+  
+  [[9]] {{{wildcard.html}Wildcard support}}
+  
\ No newline at end of file

Added: tiles/framework/trunk/src/site/apt/tutorial/advanced/wildcard.apt
URL: 
http://svn.apache.org/viewvc/tiles/framework/trunk/src/site/apt/tutorial/advanced/wildcard.apt?rev=697173&view=auto
==============================================================================
--- tiles/framework/trunk/src/site/apt/tutorial/advanced/wildcard.apt (added)
+++ tiles/framework/trunk/src/site/apt/tutorial/advanced/wildcard.apt Fri Sep 
19 11:17:29 2008
@@ -0,0 +1,52 @@
+~~ $Id: nesting-extending.apt 695577 2008-09-15 18:47:00Z apetrelli $
+~~
+~~ 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.
+~~
+         -----------
+         Wildcard support
+         -----------
+
+Wildcard support
+
+  By default, Tiles 2.1 supports wildcards in definition names. Wilcards help a
+  lot in writing less code to declare your definitions. Take this example:
+
+------------------------------------
+<definition name="test.definition*.message*" template="/layout{1}.jsp">
+    <put-attribute name="title"  value="This definition has a message: {2}."/>
+    <put-attribute name="header" value="/header.jsp"/>
+    <put-attribute name="body"   value="/body.jsp"/>
+</definition>
+------------------------------------
+
+  If you insert a definition that matches the definition, for example:
+
+------------------------------------
+<tiles:insertDefinition name="test.definitionOne.messageThisIsAMessage" />
+------------------------------------
+
+  The definition is automatically mapped, replacing placeholders, marked by
+  curly brackets, with the value of matched definitions. In this case:
+
+------------------------------------
+<definition name="test.definitionOne.messageThisIsAMessage" 
template="/layoutOne.jsp">
+    <put-attribute name="title"  value="This definition has a message: 
ThisIsAMessage."/>
+    <put-attribute name="header" value="/header.jsp"/>
+    <put-attribute name="body"   value="/body.jsp"/>
+</definition>
+------------------------------------

Modified: tiles/framework/trunk/src/site/apt/tutorial/index.apt
URL: 
http://svn.apache.org/viewvc/tiles/framework/trunk/src/site/apt/tutorial/index.apt?rev=697173&r1=697172&r2=697173&view=diff
==============================================================================
--- tiles/framework/trunk/src/site/apt/tutorial/index.apt (original)
+++ tiles/framework/trunk/src/site/apt/tutorial/index.apt Fri Sep 19 11:17:29 
2008
@@ -57,6 +57,8 @@
   
         [[8]] {{{advanced/menu.html}Menu-ing support}}
   
+        [[9]] {{{advanced/wildcard.html}Wildcard support}}
+  
   [[6]] {{{integration/index.html}Integration with other technologies}}
   
         [[1]] {{{integration/frameworks.html}Integration with other 
frameworks}}

Modified: tiles/framework/trunk/src/site/site.xml
URL: 
http://svn.apache.org/viewvc/tiles/framework/trunk/src/site/site.xml?rev=697173&r1=697172&r2=697173&view=diff
==============================================================================
--- tiles/framework/trunk/src/site/site.xml (original)
+++ tiles/framework/trunk/src/site/site.xml Fri Sep 19 11:17:29 2008
@@ -104,6 +104,9 @@
                     <item   
                             name="Menu-ing"
                             href="tutorial/advanced/menu.html"/>
+                    <item   
+                            name="Wildcard support"
+                            href="tutorial/advanced/wildcard.html"/>
                 </item>
                 <item   
                         name="Integrations"


Reply via email to