Chapter 2
[ 43 ]
If you refresh the page in the browser now, you will notice that the change you have
just made to the code is almost immediately reflected by the running application
without any effort from your side. But is this always true?
Open the Start.tml file in the code editor and make some change to its text. For
example, replace the current header:
t5first Start Page
with a new one:
My First Tapestry Application
Save the file and reload the page in the browser. You will see that the change you
have made is not reflected by the running application, because you have changed
an HTML file, and not Java code. Similar to NetBeans, Eclipse doesn't care about
changes in HTML files.
One way to update the application in such case is to follow the advice given for
NetBeans??” make a change, even if it is an insignificant one, to some Java file, and
save the file. The application will be then reloaded automatically.
Similar to NetBeans, Eclipse doesn't know which editor to use for files
with a tml extension, Tapestry page templates. Let's teach Eclipse to open
these files using either HTML or XML editor.
In the menu, open Window | Preferences and in the tree view on the left
hand side navigate to General | Content Types.
Pages:
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66