Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Minor wordsmithing

...

Warning

Only component classes should go in any of these controlled packages; classes representing data, or interfaces, or anything that isn't precisely a component class, must go elsewhere. Any top-level class in any of the controlled packages will be transformed at runtime. The only exception is inner classes
(anonymous or not), which are loaded by the same class loader as the component class loader, but not transformed as components.

...

Tapestry performs some simple optimizations of the logical page name (or component type, or mixin type). It checks to see if the package name is either a prefix or a suffix of the unqualified class name (case insensitively, of course) and removes the prefix or suffix if so. The net result is that a class name such as com.example.myapp.pages.user.EditUser will have a page name of user/Edit (not instead of user/EditUser). The goal here is to provide shorter, more natural URLs.

...

One special simplification are exists for Index pages: if the logical page name is Index after removing the package name from the unqualified class name, it will map to the root of that folder. A class such as com.example.myapp.pages.user.IndexUser or com.example.myapp.pages.user.UserIndex will have a page name of user/.

...

The distinction between pages and component is very, very small. The only real primary difference is the package name: root.pages.PageName for pages, and root.components.ComponentType for components. Conceptually, page components are simply the root component of a page's component tree.

...

For the most part, these transformations are both sensible and invisible. In a few limited cases, they are marginally leakycomprise a marginally leaky abstraction – for instance, the scope restrictions on instance variables described below – but we feel that the programming model in general will support supports a very high levels level of developer productivity.

...

Be aware that you will need to either 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, or else annotate the fields with @Property.

Transient Instance Variables

...