SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 63 | Next

Alexander Kolesnikov

"Tapestry 5: Building Web Applications"

Its purpose is to display a link that leads to a page
of the application. In this case, the application has only one page??”Start, so the
component links this page to itself. That is, when the link is clicked on, the same
page will be redisplayed (in other words, it will be refreshed).
Tapestry 5 is in many cases case-insensitive. In this case, you are free to write the
name of the component and of the page in any case you like, for example, like this:
refresh
There is also another piece of Tapestry instrumentation in this template, an
expansion that looks like this:
${currentTime}
Expansion is a kind of window through which we can see the value of a property
in the page class. However, before discussing how expansions work, let's have a
look at the page class for the already familiar Start page. Its code can be found in
Start.java file and is shown as follows:
package com.packtpub.t5first.pages;
import java.util.Date;
/**
* Start page of application t5first.
*/
public class Start
{
public String getCurrentTime()
{
Date date = new Date();
String message = ". Tapestry is cool!";
return date + message;
}
}
Please note that this class is exactly what is usually termed as POJO (Plain Old
Java Object), which means that it is a simple class that doesn't inherit from any
framework-specific parent and doesn't implement any framework-specific interfaces.


Pages:
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6