Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Formatting fixes

...

A Tapestry application is composed of pages, each page consisting of one template file and one Java class.

Tapestry

...

page

...

templates

...

have

...

the

...

.tml

...

extension

...

and

...

are

...

found within src/main/resources/ under the app's pages package (src/main/resources/com/example/newapp/pages

...

,

...

in

...

this example).

...

Templates

...

are

...

essentially

...

HTML

...

with

...

some

...

special

...

markup

...

to

...

reference

...

properties

...

in

...

the

...

corresponding

...

Java

...

class

...

and

...

to

...

reference

...

ready-made

...

or

...

custom

...

components.

Similarly, Tapestry page classes are found in within the src/main/java under the app's pages package (src/main/java/com/example/newapp/pages, in this example) and their name matches their template name (Index.tml -> Index.java).

In the skeleton project, most of the HTML is not found on the pages themselves but in a Layout component which acts as a global template for the whole site. Java classes for components live in src/main/java/com/example/newapp/components and component templates go in src/main/resources/com/example/newapp/components.

...