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 66 | Next

Alexander Kolesnikov

"Tapestry 5: Building Web Applications"

apache.org/schema/tapestry_5_0_0.xsd">

Tapestry Start Page


Tapestry Start Page


The current date and time is: ${currentTime}.


The same date and time in milliseconds is:
${currentTime.time}.


Here is the value: ${someValue}


[refresh]




The output produced by Tapestry should look like this:
Chapter 3
[ 53 ]
As you can see, using an expansion, we can easily display not only the page property
(currentTime, as returned by the getCurrentTime method of the page class), but
also a property of that property (the time property as returned by the getTime
method of the Date class).
Here, Tapestry relies on the fact that getter methods are usually named in a standard
JavaBean style, by capitalizing the first letter of the property name and appending
get in front of it. However, there are methods that do not follow this rule. Say,
Date class also has a method called hashCode. What if we want to display the value
returned by that method? Let's try and add to the page template the following line
of code:
And here is the hash code for it: ${currentTime.hashCode}.


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