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

Alexander Kolesnikov

"Tapestry 5: Building Web Applications"


Now let's have a look at what the body of the Loop contains. Basically, there are four
table cells ( elements) with some content in them. In two cases, the content is
just an expansion, like this one:
${celebrity.firstName}
You might remember that in this case Tapestry will look for the getCelebrity
method in the page class and then try to call the getFirstName method on an object
returned by getCelebrity().
However, we can also find a new type of component in one of the cells:

Instead of this component, we could use an expansion like ${celebrity.
dateOfBirth}, but in this case, the date of birth would be displayed in some
default format, which is not appropriate for date of birth; that is, we would have
no control over how the date is displayed. The Output component provides us
exactly that??”an opportunity to format the displayed information in any way
we want. The information to display is provided through the value parameter
(t:value="celebrity.dateOfBirth" attribute), and the format, through
the format parameter (t:format="dateFormat" attribute). You may have
already guessed that the ShowAll page class in our application should have the
getDateFormat method for the latter binding to work.


Pages:
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6