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

Alexander Kolesnikov

"Tapestry 5: Building Web Applications"

Instead, a completely different text will be displayed. In
our case, it will read "User Name".
How will Tapestry manage to figure out which label to use? In fact, as the Label
component points to some other component that it labels (in our case TextField), it
is for that labeled component to define what exactly the label should say.
To define the label of our TextField, we could use a special attribute, t:label,
like this:
t:label="User Name" t:value="userName"/>
However, we have chosen a different approach and provided a t:id attribute only,
with the value of userName. Tapestry can handle this too. If it cannot find a t:label
attribute, it takes the t:id one and then transforms its value by splitting it into
words and capitalizes them all. As you see, Tapestry is quite clever.
Next, have a look at the PasswordField component. It is defined almost in the same
way as TextField, and is only displayed differently (it is rendered as a type="password"> HTML control). Any input into this field is masked and not
redisplayed when the page is reloaded (when authentication fails, for example). A
PasswordField also has a Label associated with it, and uses the same trick with
t:id to provide the value for that label.


Pages:
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6