Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Tapestry components may have instance variables (unlike Tapestry 4, where you had to use abstract properties).

Instance variables must be private.. These scope restrictions are necessary in order for Tapestry to perform runtime class modifications to support instance variables. You may have instance variables with other scopes in your class, but you may then see unexpected behavior in a production application because of how Tapestry shares and reuses pages and components. Tapestry will log an error for each component class that contains instance variables that violate these scope restrictions.

Be aware that you will need to provide getter and setter methods to access your classes' instance variables. Tapestry does not do this automatically unless you provide the @Property annotation on the field.

...

Since release 5.3.2, instance variables may be protected, or package private (that is, no access modifier). Under specific circumstances they may even be public (public fields must either be final, or have the @

...

Retain annotation).

Be aware that you will need to provide getter and setter methods to access your classes' instance variables. Tapestry does not do this automatically unless you provide the @Property annotation on the field.

Transient Instance Variables

...