You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by an...@apache.org on 2006/08/30 17:46:38 UTC

svn commit: r438525 - in /tapestry/tapestry4/trunk/src/site: site.xml xdoc/components/Relation.xml xdoc/components/Style.xml

Author: andyhot
Date: Wed Aug 30 08:46:37 2006
New Revision: 438525

URL: http://svn.apache.org/viewvc?rev=438525&view=rev
Log:
TAPESTRY-199: Add docs for Style and Relation components

Added:
    tapestry/tapestry4/trunk/src/site/xdoc/components/Relation.xml
    tapestry/tapestry4/trunk/src/site/xdoc/components/Style.xml
Modified:
    tapestry/tapestry4/trunk/src/site/site.xml

Modified: tapestry/tapestry4/trunk/src/site/site.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/src/site/site.xml?rev=438525&r1=438524&r2=438525&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/src/site/site.xml (original)
+++ tapestry/tapestry4/trunk/src/site/site.xml Wed Aug 30 08:46:37 2006
@@ -127,6 +127,7 @@
                 <item name="PropertySelection" href="/components/PropertySelection.html" />
                 <item name="Radio" href="/components/Radio.html" />
                 <item name="RadioGroup" href="/components/RadioGroup.html" />
+                <item name="Relation" href="/components/Relation.html" />                
                 <item name="RenderBlock" href="/components/RenderBlock.html" />
                 <item name="RenderBody" href="/components/RenderBody.html" />
                 <item name="Rollover" href="/components/Rollover.html" />
@@ -134,6 +135,7 @@
                 <item name="Select" href="/components/Select.html" />
                 <item name="ServiceLink" href="/components/ServiceLink.html" />
                 <item name="Shell" href="/components/Shell.html" />
+                <item name="Style" href="/components/Style.html" />                
                 <item name="Submit" href="/components/Submit.html" />
                 <item name="TextArea" href="/components/TextArea.html" />
                 <item name="TextField" href="/components/TextField.html" />

Added: tapestry/tapestry4/trunk/src/site/xdoc/components/Relation.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/src/site/xdoc/components/Relation.xml?rev=438525&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/src/site/xdoc/components/Relation.xml (added)
+++ tapestry/tapestry4/trunk/src/site/xdoc/components/Relation.xml Wed Aug 30 08:46:37 2006
@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+    Copyright 2004, 2005, 2006 The Apache Software Foundation
+    
+    Licensed 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.
+-->
+<document>
+    <properties>
+        <title>Relation</title>
+    </properties>
+    <body>
+
+        <section name="Relation">
+
+            <p>
+                Creates a relationship between two documents. Examples of such relationships
+                include: stylesheet, alternate stylesheet, shortcut icon, copyright, bookmark,
+                chapter, glossary, help, home, next, prev, e.t.c. 
+            </p>
+            <p>
+                Note that a Shell component is required when using the Relation element. 
+                The Shell component is responsible for gathering all Relation
+                components found in a page, and rendering them inside the 
+                <code>&lt;head&gt;</code> tag.
+            </p>            
+            <p>
+                <strong>See also:</strong>
+                <a href="Style.html">Style</a>
+                ,
+                <a href="Shell.html">Shell</a>
+            </p>
+
+            <section name="Parameters">
+                <table>
+                    <tr>
+                        <th>Name</th>
+                        <th>Type</th>
+                        <th>Required</th>
+                        <th>Default</th>
+                        <th>Description</th>
+                    </tr>
+
+                    <tr>
+                        <td>href</td>
+                        <td>String or 
+                        <a href="../tapestry-framework/apidocs/org/apache/tapestry/IAsset.html">IAsset</a>
+                        </td>
+                        <td>yes</td>
+                        <td></td>
+                        <td>The target URL of the related resource.</td>
+                    </tr>
+                    
+                    <tr>
+                        <td>rel</td>
+                        <td>String</td>
+                        <td>no</td>
+                        <td>literal:stylesheet</td>
+                        <td>Defines the relationship between the current document and the targeted document.</td>
+                    </tr> 
+                    
+                    <tr>
+                        <td>type</td>
+                        <td>String</td>
+                        <td>no</td>
+                        <td>literal:text/css</td>
+                        <td>Specifies the MIME type of the target URL.</td>
+                    </tr>                      
+                    
+                    <tr>
+                        <td>rev</td>
+                        <td>String</td>
+                        <td>no</td>
+                        <td></td>
+                        <td>Defines the relationship between the targeted document and the current document, 
+                        i.e. the reverse relationship.</td>
+                    </tr>                     
+                    
+                    <tr>
+                        <td>title</td>
+                        <td>String</td>
+                        <td>no</td>
+                        <td></td>
+                        <td>The title of the relation.</td>
+                    </tr> 
+                    
+                    <tr>
+                        <td>media</td>
+                        <td>String</td>
+                        <td>no</td>
+                        <td></td>
+                        <td>Specifies on which device the document will be displayed.</td>
+                    </tr>                                                                                                 
+                </table>
+
+                <p>
+                    Body:
+                    <strong>removed</strong>
+                </p>
+
+                <p>
+                    Informal parameters:
+                    <strong>forbidden</strong>
+                </p>
+
+                <p>
+                    Reserved parameters:
+                    <em>none</em>
+                </p>
+
+            </section>
+
+            <section name="Examples">
+
+                <p>
+                    This example demonstrates how a component (in this case Article) can declare
+                    relationships to external documents. In this case, all declarations
+                    (a stylesheet, a shortcut icon and a copyright document) are rendered inside the 
+                    <code>&lt;head&gt;</code> tag of the containing page.
+                </p>
+
+                <p>Home.html</p>
+                <source xml:space="preserve">
+&lt;html jwcid="@Shell" title="Relation Example"&gt;
+   &lt;body jwcid="@Body"&gt;
+      &lt;span jwcid="@Article"/>
+  &lt;/body&gt;
+&lt;/html&gt;
+</source>
+                <p>Article.html</p>
+                <source xml:space="preserve">
+&lt;link jwcid="@Relation" href="main.css" media="all"/&gt;                
+&lt;link jwcid="@Relation" rel="shortcut icon" href="favicon.ico" type="image/gif"/&gt;
+&lt;link jwcid="@Relation" rel="copyright" href="http://www.gnu.org/copyleft/fdl.html"/&gt;  
+Article details ...
+</source>
+                <p>Article.jwc</p>
+                <source xml:space="preserve">
+&lt;component-specification allow-body="yes" allow-informal-parameters="no"&gt;
+&lt;/component-specification&gt;
+</source>
+            </section>
+
+        </section>
+
+    </body>
+</document>

Added: tapestry/tapestry4/trunk/src/site/xdoc/components/Style.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/src/site/xdoc/components/Style.xml?rev=438525&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/src/site/xdoc/components/Style.xml (added)
+++ tapestry/tapestry4/trunk/src/site/xdoc/components/Style.xml Wed Aug 30 08:46:37 2006
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+    Copyright 2004, 2005, 2006 The Apache Software Foundation
+    
+    Licensed 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.
+-->
+<document>
+    <properties>
+        <title>Style</title>
+    </properties>
+    <body>
+
+        <section name="Style">
+
+            <p>
+                Declares a stylesheet to be included in the current page. This component
+                is a special case of the <a href="Relation.html">Relation</a> component, 
+            </p>
+            <p>
+                Note that a Shell component is required when using the Style element. 
+                The Shell component is responsible for gathering all Style 
+                components found in a page, and rendering them inside the 
+                <code>&lt;head&gt;</code> tag.
+            </p>  
+            <p>
+                <strong>See also:</strong>
+                <a href="Relation.html">Relation</a>
+                ,
+                <a href="Shell.html">Shell</a>
+            </p>
+
+            <section name="Parameters">
+                <table>
+                    <tr>
+                        <th>Name</th>
+                        <th>Type</th>
+                        <th>Required</th>
+                        <th>Default</th>
+                        <th>Description</th>
+                    </tr>
+
+                    <tr>
+                        <td>href</td>
+                        <td>String or 
+                        <a href="../tapestry-framework/apidocs/org/apache/tapestry/IAsset.html">IAsset</a>
+                        </td>
+                        <td>no</td>
+                        <td></td>
+                        <td>The target URL of the related resource. <br/>
+                        If this value is provided and is not null, this component behaves exactly like the 
+                        <a href="Relation.html">Relation</a> component, i.e. it renders a <code>&lt;link&gt;</code>
+                        tag in the html header.<br/>
+                        Otherwise, it renders a <code>&lt;style&gt;</code> tag which includes its contents.
+                        </td>
+                    </tr>
+                    
+                    <tr>
+                        <td>rel</td>
+                        <td>String</td>
+                        <td>no</td>
+                        <td>literal:stylesheet</td>
+                        <td>Defines the relationship between the current document and the targeted document.</td>
+                    </tr> 
+                    
+                    <tr>
+                        <td>title</td>
+                        <td>String</td>
+                        <td>no</td>
+                        <td></td>
+                        <td>The title of the stylesheet.</td>
+                    </tr> 
+                    
+                    <tr>
+                        <td>media</td>
+                        <td>String</td>
+                        <td>no</td>
+                        <td></td>
+                        <td>Specifies on which device this stylesheet will apply.</td>
+                    </tr>                                                                                                 
+                </table>
+
+                <p>
+                    Body:
+                    <strong>allowed</strong>
+                </p>
+
+                <p>
+                    Informal parameters:
+                    <strong>forbidden</strong>
+                </p>
+
+                <p>
+                    Reserved parameters:
+                    <em>none</em>
+                </p>
+
+            </section>
+
+            <section name="Examples">
+
+                <p>
+                    This example demonstrates how a component (in this case Book) can declare
+                    additional css files and use specific styles. In this case, both declarations
+                    (a css file and an inline style) are rendered inside the 
+                    <code>&lt;head&gt;</code> tag of the containing page.
+                </p>
+
+                <p>Home.html</p>
+                <source xml:space="preserve">
+&lt;html jwcid="@Shell" title="Style Example"&gt;
+   &lt;body jwcid="@Body"&gt;
+      &lt;span jwcid="@Book"/>
+  &lt;/body&gt;
+&lt;/html&gt;
+</source>
+                <p>Book.html</p>
+                <source xml:space="preserve">
+&lt;link jwcid="@Style" href="main.css" media="all"/&gt;  
+&lt;style jwcid="@Relation" media="print"&gt;      
+body {background:none;}
+&lt;/style&gt;
+
+Book details ...
+</source>
+                <p>Book.jwc</p>
+                <source xml:space="preserve">
+&lt;component-specification allow-body="yes" allow-informal-parameters="no"&gt;
+&lt;/component-specification&gt;
+</source>
+            </section>
+
+        </section>
+
+    </body>
+</document>