Author: hlship
Date: Mon Oct 13 16:38:56 2008
New Revision: 704285
URL: http://svn.apache.org/viewvc?rev=704285&view=rev
Log:
TAP5-276: Add documentation about the use of @Inject to mark the correct
constructor of a bean (i.e., when using BeanEditForm)
Modified:
tapestry/tapestry5/trunk/src/site/apt/guide/beaneditform.apt
tapestry/tapestry5/trunk/src/site/apt/index.apt
Modified: tapestry/tapestry5/trunk/src/site/apt/guide/beaneditform.apt
URL:
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/src/site/apt/guide/beaneditform.apt?rev=704285&r1=704284&r2=704285&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/src/site/apt/guide/beaneditform.apt (original)
+++ tapestry/tapestry5/trunk/src/site/apt/guide/beaneditform.apt Mon Oct 13
16:38:56 2008
@@ -42,6 +42,18 @@
If the object does not exist, it will be created as needed. The type is
determined from the property type, which should be a specific type
in order for automatic creation to operate properly.
+
+ The BeanEditForm component will attempt to instantiate a value for the
property as necessary, when the form is submitted.
+ This can be a problem when the property type is an interface, rather than an
instantiable class.
+
+ One option is to provide an event handler for the "prepare" or
"prepareForSubmit" events to instantiate an instance
+ to receive the submitted information.
+
+ For a class, Tapestry will select the public constructor with the <most>
parameters. If this is not desirable
+ (for example, if you get an exception),
+ then place the
+ {{{../../apidocs/org/apache/tapestry5/ioc/annotations/Inject.html}Inject}}
annotation on the constructor
+ Tapestry should use.
* Implicit Object Binding
Modified: tapestry/tapestry5/trunk/src/site/apt/index.apt
URL:
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/src/site/apt/index.apt?rev=704285&r1=704284&r2=704285&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/src/site/apt/index.apt (original)
+++ tapestry/tapestry5/trunk/src/site/apt/index.apt Mon Oct 13 16:38:56 2008
@@ -47,7 +47,7 @@
*--+--+--+
| {{{http://code.google.com/p/gc-tapestry-components/}Godcode Components}} |
Chris Lewis | A mixed collection of components providing simple but
time-saving functionality, as well as more exotic ones; built on top of the
prototype and script.aculo.us javascript libraries. |
*--+--+--+
-| {{{http://files.doublenegative.com.au/jumpstart/}JumpStart}} | Geoff
Callender | A "living tutorial" in the form of a base Tapestry application
ready to be expanded and customized. |
+| <<{{{http://files.doublenegative.com.au/jumpstart/}JumpStart}}>> | Geoff
Callender | A "living tutorial" in the form of a base Tapestry application
ready to be expanded and customized. |
*--+--+--+
| {{{http://interldap.org}InterLDAP}} | Linagora / Francois Armand | LDAP
content management system for non tech users. |
*--+--+--+