Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added "Related Info" box

Parameter Type Coercions

Wiki Markup
{float:right}
{info:title=Related Articles}
* [TypeCoercer Service|IoC - coerce]
{info}
{float}

Tapestry automatically handles type coercions for parameters.

...

Tapestry will automatically coerce the bound value, a long, to the parameter's type, int. This may be a lossy coercion (if the long represents a number larger than can be stored in an int).

TypeCoercer Service

Main Article: TypeCoercer Service

The TypeCoercer service is responsible for this type coercion. This service is part of the tapestry-ioc module, and is documented there. The service is quite extensible, allowing for new types and coercions to be added easily. The TapestryModule contributes a few additional coercions into the TypeCoercer service.