You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by an...@apache.org on 2006/08/11 17:13:29 UTC
svn commit: r430803 -
/tapestry/tapestry4/trunk/tapestry-annotations/src/site/xdoc/index.xml
Author: andyhot
Date: Fri Aug 11 08:13:28 2006
New Revision: 430803
URL: http://svn.apache.org/viewvc?rev=430803&view=rev
Log:
TAPESTRY-1040: Document @Component's ability to infer type
Modified:
tapestry/tapestry4/trunk/tapestry-annotations/src/site/xdoc/index.xml
Modified: tapestry/tapestry4/trunk/tapestry-annotations/src/site/xdoc/index.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-annotations/src/site/xdoc/index.xml?rev=430803&r1=430802&r2=430803&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-annotations/src/site/xdoc/index.xml (original)
+++ tapestry/tapestry4/trunk/tapestry-annotations/src/site/xdoc/index.xml Fri Aug 11 08:13:28 2006
@@ -144,20 +144,29 @@
</p>
<p>
- The type must be specified. By default, the component id will match the property
- name:
+ By default, the component type will match the return type
+ and the component id will match the property name:
</p>
-
+
<source xml:space="preserve">
- @Component(type = "TextField")
+ @Component
public abstract TextField getEmail();
</source>
- <p>When the two must differ, then the id attibute can be specified:</p>
+ <p>When component type and return type differ,
+ then the type attibute should be specified:</p>
+
+ <source xml:space="preserve">
+ @Component(type = "contrib:Table")
+ public abstract Table getResultsTable();
+</source>
+
+ <p>Additionally, when component id and property name differ,
+ then the id attibute can be specified:</p>
<source xml:space="preserve">
- @Component(id = "email" type = "TextField")
+ @Component(id = "email")
public abstract TextField getEmailField();
</source>