You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by ds...@apache.org on 2005/10/13 02:42:26 UTC
svn commit: r317020 - in /jakarta/tapestry/trunk: ./
doc/src/ComponentReference/ doc/src/ComponentReference/images/
framework/src/documentation/content/xdocs/tapestry/ComponentReference/
framework/src/documentation/resources/images/tapestry/ComponentRe...
Author: dsolis
Date: Wed Oct 12 17:42:08 2005
New Revision: 317020
URL: http://svn.apache.org/viewcvs?rev=317020&view=rev
Log:
Fix bug:TAPESTRY-470. Document Image component
Added:
jakarta/tapestry/trunk/framework/src/documentation/resources/images/tapestry/ComponentReference/Image.png (with props)
jakarta/tapestry/trunk/framework/src/documentation/resources/images/tapestry/ComponentReference/PoweredByTapestry.png (with props)
Removed:
jakarta/tapestry/trunk/doc/src/ComponentReference/Image.html
jakarta/tapestry/trunk/doc/src/ComponentReference/images/elvis.jpg
jakarta/tapestry/trunk/doc/src/ComponentReference/images/poweredby.png
Modified:
jakarta/tapestry/trunk/framework/src/documentation/content/xdocs/tapestry/ComponentReference/Image.xml
jakarta/tapestry/trunk/src/documentation/content/xdocs/links.ent
jakarta/tapestry/trunk/status.xml
Modified: jakarta/tapestry/trunk/framework/src/documentation/content/xdocs/tapestry/ComponentReference/Image.xml
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/documentation/content/xdocs/tapestry/ComponentReference/Image.xml?rev=317020&r1=317019&r2=317020&view=diff
==============================================================================
--- jakarta/tapestry/trunk/framework/src/documentation/content/xdocs/tapestry/ComponentReference/Image.xml (original)
+++ jakarta/tapestry/trunk/framework/src/documentation/content/xdocs/tapestry/ComponentReference/Image.xml Wed Oct 12 17:42:08 2005
@@ -28,11 +28,12 @@
<body>
-<p> <strong>THIS PAGE UNDER CONSTRUCTION</strong>
+<p> Displays an image, deriving the source URL for the image from an asset.
+<br/>&Rollover; is a similar component that can create dynamic mouse-over effects as well.
</p>
<p>
- <strong>See also:</strong>
+ <strong>See also: &ImageSubmit;, &Rollover;</strong>
</p>
<section>
@@ -47,26 +48,117 @@
<th>Default</th>
<th>Description</th>
</tr>
-
+ <tr>
+ <td>image</td>
+ <td>&IAsset;</td>
+
+ <td>in</td>
+ <td>yes</td>
+ <td></td>
+ <td>
+ The image to show.
+ </td>
+ </tr>
</table>
<p>
- Body: <strong>removed / allowed</strong>
+ Body: <strong>removed</strong>
</p>
<p>
- Informal parameters: <strong>allowed / forbidden</strong>
+ Informal parameters: <strong>allowed</strong>
</p>
<p>
- Reserved parameters: <em>none</em>
+ Reserved parameters: <em>src</em>
</p>
</section>
<section>
<title>Examples</title>
-
+<p>Inserts the static context path based image.<br/>This example uses a <context-asset> to reference the image.</p>
+<figure src="&projectroot;/images/tapestry/ComponentReference/PoweredByTapestry.png" alt="PoweredByTapestry Screen Shot"/>
+<p>HTML Template</p>
+<source><![CDATA[
+<table cellpadding="8" valign="middle">
+<tr>
+ <td>
+ <a href="http://jakarta.apache.org/tapestry/">
+ <img jwcid="@Image" image="asset:imageAsset" alt="View Tapestry Home"/>
+ </a>
+ </td>
+ <td>
+ <font color="navy" size="+2"><b><i>Powered by Tapestry</i></b></font>
+ </td>
+</tr>
+</table>
+]]></source>
+
+<p>Page Specification</p>
+<source><![CDATA[
+<asset name="imageAsset" path="/images/poweredby.png"/>
+]]></source>
+
+<p><br/>Inserts the dynamic image obtained from the page's NewsItem property.<br/>This example uses the &ExternalAsset; to reference the image's URL.</p>
+<figure src="&projectroot;/images/tapestry/ComponentReference/Image.png" alt="Image Screen Shot"/>
+<p>HTML Template</p>
+<source><![CDATA[
+<table cellpadding="8">
+<tr>
+ <td>
+ <h4><span jwcid="@Insert" value="ognl:newsItem.title"/></h4>
+ <span jwcid="@Insert" value="ognl:newsItem.body"/>
+ <p>
+ Date : <span jwcid="@Insert" value="ognl:newsItem.date" format="ognl:@NewsItemPage@DATE_FORMAT"/>
+ </td>
+ <td>
+ <img jwcid="@Image" image="ognl:newsItem.imageAsset" alt="ognl:newsItem.summary"/>
+ </td>
+</tr>
+</table>
+]]></source>
+
+<p>Page Specification</p>
+<source><![CDATA[
+<property name="orderItem" type="com.dsconsulting.cms.model.NewsItem"/>
+]]></source>
+
+<p>Java classes</p>
+<source><![CDATA[
+public abstract class NewsItemPage extends BasePage {
+ public static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("dd MMM yyyy");
+
+ public abstract NewsItem getNewsItem();
+}
+
+public class NewsItem implements Serializable {
+ private String title;
+ private String body;
+ private String summary;
+ private Date date;
+ private String imageURL;
+
+ public NewsItem(String title, String summary, String body, Date date,
+ String imageURL) {
+ this.title = title;
+ this.body = body;
+ this.summary = summary;
+ this.date = date;
+ this.imageURL = imageURL;
+ }
+
+ public String getTitle() { return title; }
+
+ public String getBody() { return body; }
+
+ public String getSummary() { return summary; }
+
+ public String getDate() { return date; }
+
+ public IAsset getImageAsset() { return new ExternalAsset(imageURL, null); }
+}
+]]></source>
</section>
</body>
</document>
Added: jakarta/tapestry/trunk/framework/src/documentation/resources/images/tapestry/ComponentReference/Image.png
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/documentation/resources/images/tapestry/ComponentReference/Image.png?rev=317020&view=auto
==============================================================================
Binary file - no diff available.
Propchange: jakarta/tapestry/trunk/framework/src/documentation/resources/images/tapestry/ComponentReference/Image.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: jakarta/tapestry/trunk/framework/src/documentation/resources/images/tapestry/ComponentReference/PoweredByTapestry.png
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/framework/src/documentation/resources/images/tapestry/ComponentReference/PoweredByTapestry.png?rev=317020&view=auto
==============================================================================
Binary file - no diff available.
Propchange: jakarta/tapestry/trunk/framework/src/documentation/resources/images/tapestry/ComponentReference/PoweredByTapestry.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Modified: jakarta/tapestry/trunk/src/documentation/content/xdocs/links.ent
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/src/documentation/content/xdocs/links.ent?rev=317020&r1=317019&r2=317020&view=diff
==============================================================================
--- jakarta/tapestry/trunk/src/documentation/content/xdocs/links.ent (original)
+++ jakarta/tapestry/trunk/src/documentation/content/xdocs/links.ent Wed Oct 12 17:42:08 2005
@@ -51,6 +51,7 @@
<!ENTITY EvenOdd '<link href="&apiroot;/bean/EvenOdd.html">EvenOdd</link>'>
<!ENTITY ExceptionAnalyzer '<link href="&apiroot;/util/exception/ExceptionAnalyzer.html">ExceptionAnalyzer</link>'>
<!ENTITY ExceptionDescription '<link href="&apiroot;/util/exception/ExceptionDescription.html">ExceptionDescription</link>'>
+<!ENTITY ExternalAsset '<link href="&apiroot;/ExternalAsset.html">ExternalAsset</link>'>
<!ENTITY IAsset '<link href="&apiroot;/IAsset.html">IAsset</link>'>
<!ENTITY IBeanProvider '<link href="&apiroot;/IBeanProvider.html">IBeanProvider</link>'>
<!ENTITY IBinding '<link href="&apiroot;/IBinding.html">IBinding</link>'>
Modified: jakarta/tapestry/trunk/status.xml
URL: http://svn.apache.org/viewcvs/jakarta/tapestry/trunk/status.xml?rev=317020&r1=317019&r2=317020&view=diff
==============================================================================
--- jakarta/tapestry/trunk/status.xml (original)
+++ jakarta/tapestry/trunk/status.xml Wed Oct 12 17:42:08 2005
@@ -54,10 +54,9 @@
<action type="fix" dev="HLS" fixes-bug="TAPESTRY-650">ClassNotFoundException thrown when deserializing an object from a client persistent property</action>
<action type="fix" dev="DS" fixes-bug="TAPESTRY-493">Document MultiplePropertySelection component</action>
<action type="fix" dev="DS" fixes-bug="TAPESTRY-496">Document Palette component</action>
- <action type="fix" dev="DS" fixes-bug="TAPESTRY-462" due-to="Warner Onstine">Document ExceptionDisplay component</action>
+ <action type="fix" dev="DS" fixes-bug="TAPESTRY-460, TAPESTRY-462, TAPESTRY-468" due-to="Warner Onstine">Document Delegator, ExceptionDisplay, Hidden components</action>
<action type="fix" dev="DS" fixes-bug="TAPESTRY-472">Document LinkSubmit component</action>
- <action type="fix" dev="DS" fixes-bug="TAPESTRY-468" due-to="Warner Onstine">Document Hidden component</action>
- <action type="fix" dev="DS" fixes-bug="TAPESTRY-460" due-to="Warner Onstine">Document Delegator component</action>
+ <action type="fix" dev="DS" fixes-bug="TAPESTRY-470">Document Image component</action>
</release>
<release version="4.0-beta-10" date="Oct 8 2005">
<action type="fix" dev="HLS" fixes-bug="TAPESTRY-344">Unimplemented abstract method check broken</action>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org