Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Another link to tye TypeCoercer Service page

...

Tapestry automatically handles type coercions for component parameters.

Type coercions occur when a value passed into a parameter (as bound in a template or in an annotation) does not match the type of the parameter.

...

Here, the type of all three parameters is int.

However, it is likely that the component will be used as so:

...

A bare whole number is interpreted by the prop binding prefix as a long. So this is the long value 3.

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

...