You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by mi...@apache.org on 2005/09/10 01:11:03 UTC
svn commit: r279910 - in
/jakarta/tapestry/trunk/framework/src/documentation/content/xdocs/tapestry/ComponentReference:
Else.xml If.xml
Author: mindbridge
Date: Fri Sep 9 16:11:00 2005
New Revision: 279910
URL: http://svn.apache.org/viewcvs?rev=279910&view=rev
Log:
The documentation of If and Else (TAPESTRY-469)
Added:
jakarta/tapestry/trunk/framework/src/documentation/content/xdocs/tapestry/ComponentReference/Else.xml
Modified:
jakarta/tapestry/trunk/framework/src/documentation/content/xdocs/tapestry/ComponentReference/If.xml
Added: jakarta/tapestry/trunk/framework/src/documentation/content/xdocs/tapestry/ComponentReference/Else.xml
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/documentation/content/xdocs/tapestry/ComponentReference/Else.xml?rev=279910&view=auto
==============================================================================
--- jakarta/tapestry/trunk/framework/src/documentation/content/xdocs/tapestry/ComponentReference/Else.xml (added)
+++ jakarta/tapestry/trunk/framework/src/documentation/content/xdocs/tapestry/ComponentReference/Else.xml Fri Sep 9 16:11:00 2005
@@ -0,0 +1,104 @@
+<?xml version="1.0"?>
+<!--
+ Copyright 2005 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.
+-->
+
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.2//EN" "./dtd/document-v12.dtd"
+[
+ <!ENTITY projectroot '../../'>
+ <!ENTITY % links.ent SYSTEM "../../links.ent">
+ %links.ent;
+]>
+<document>
+ <header>
+ <title>Else</title>
+ </header>
+
+ <body>
+
+<p>
+Conditionally emulates an element and its attributes and/or includes a block of content
+if the condition of the previous If component evaluates to false.
+</p>
+
+<p>
+ <strong>See also: <link href="&apiroot;/components/ElseBean.html">org.apache.tapestry.components.ElseBean</link>, &If;, &Conditional;</strong>
+</p>
+
+<section>
+ <title>Parameters</title>
+
+
+<table>
+ <tr>
+ <th>Name</th>
+ <th>Type</th>
+ <th>Direction</th>
+ <th>Required</th>
+ <th>Default</th>
+
+ <th>Description</th>
+ </tr>
+
+ <tr>
+ <td>element</td>
+ <td>String</td>
+ <td>in</td>
+ <td>no</td>
+ <td> </td>
+
+ <td>The element to emulate. If specified, then the component acts like an &Any;, emitting an open and close tag.
+Informal parameters are applied to the tag. If no element is specified, informal parameters are ignored.</td>
+ </tr>
+</table>
+
+<p>
+ Body: <strong>allowed</strong>
+</p>
+
+<p>
+ Informal parameters: <strong>allowed</strong>
+
+</p>
+
+<p>
+ Reserved parameters: <em>none</em>
+</p>
+
+</section>
+
+<section>
+ <title>Examples</title>
+
+<p>
+
+ In the example, we say hello to our user if he/she has login, or we ask him/her login. (Just the same example for If component.)
+</p>
+<p>Home.html</p>
+
+<source><![CDATA[
+...
+<p>
+Hello, <span jwcid="@If" condition="ognl:user.login"><span jwcid="@Insert" value="ognl:user.name"/></span>
+<span jwcid="@Else"> please <span jwcid="@PageLink" page="Login">login</span></span>
+</p>
+...
+]]>
+</source>
+
+</section>
+
+</body>
+</document>
Modified: jakarta/tapestry/trunk/framework/src/documentation/content/xdocs/tapestry/ComponentReference/If.xml
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/documentation/content/xdocs/tapestry/ComponentReference/If.xml?rev=279910&r1=279909&r2=279910&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/documentation/content/xdocs/tapestry/ComponentReference/If.xml (original)
+++ jakarta/tapestry/trunk/framework/src/documentation/content/xdocs/tapestry/ComponentReference/If.xml Fri Sep 9 16:11:00 2005
@@ -28,38 +28,92 @@
<body>
-<p> <strong>THIS PAGE UNDER CONSTRUCTION</strong>
+<p>
+Conditionally emulates an element and its attributes and/or includes a block of content if a condition is met.
</p>
<p>
- <strong>See also:</strong>
+ <strong>See also: <link href="&apiroot;/components/IfBean.html">org.apache.tapestry.components.IfBean</link>, &Else;, &Conditional;</strong>
</p>
<section>
<title>Parameters</title>
+
<table>
<tr>
<th>Name</th>
<th>Type</th>
- <th>Direction</th>
+ <th>Direction</th>
<th>Required</th>
<th>Default</th>
+
<th>Description</th>
</tr>
- </table>
+ <tr>
+ <td>condition</td>
+ <td>boolean</td>
+ <td>in</td>
+ <td>yes</td>
+ <td> </td>
+
+ <td>The condition to evaluate.</td>
+ </tr>
+ <tr>
+ <td>conditionValue</td>
+ <td>boolean</td>
+ <td>in</td>
+ <td>no</td>
+ <td> </td>
+
+ <td>The value of the condition. During render this is obtained from the condition parameter.
+ During rewind it is the submitted condition.</td>
+ </tr>
+ <tr>
+ <td>listener</td>
+ <td>&IActionListener;</td>
+ <td>in</td>
+ <td>no</td>
+ <td> </td>
+
+ <td>The listener is called before the component renders itself,
+ regardless of the value of the condition parameter.</td>
+ </tr>
+ <tr>
+ <td>element</td>
+ <td>String</td>
+ <td>in</td>
+ <td>no</td>
+ <td> </td>
+
+ <td>The element to emulate. If specified, then the component acts like an &Any;, emitting an open and close tag.
+ Informal parameters are applied to the tag. If no element is specified, informal parameters are ignored.</td>
+ </tr>
+ <tr>
+ <td>volatile</td>
+ <td>boolean</td>
+ <td>in</td>
+ <td>no</td>
+ <td>false</td>
+
+ <td>Only active in a form. Determines whether to avoid creating hidden fields within a form.
+ Using this parameter may make the form structure different during render and rewind,
+ and cause exceptions as a result. Please use with caution.</td>
+ </tr>
+</table>
<p>
- Body: <strong>removed / allowed</strong>
+ Body: <strong>allowed</strong>
</p>
<p>
- Informal parameters: <strong>allowed / forbidden</strong>
+ Informal parameters: <strong>allowed</strong>
+
</p>
<p>
- Reserved parameters: <em>none</em>
+ Reserved parameters: <em>name</em>, <em>form</em>
</p>
</section>
@@ -67,6 +121,22 @@
<section>
<title>Examples</title>
+<p>
+ In this example we say hello to our user if he/she has login, or we ask him/her login.
+</p>
+<p>Home.html</p>
+
+<source><![CDATA[
+...
+<p>
+Hello, <span jwcid="@If" condition="ognl:user.login"><span jwcid="@Insert" value="ognl:user.name"/></span>
+<span jwcid="@Else">please <span jwcid="@PageLink" page="Login">login</span></span>
+</p>
+...
+]]>
+</source>
+
</section>
+
</body>
-</document>
\ No newline at end of file
+</document>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org