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

Alexander Kolesnikov

"Tapestry 5: Building Web Applications"

One possible way to provide the else parameter was shown
previously, let's have a look at it once again:


t:value="subscribe"
onclick="this.form.submit()"/>
Check the box to subscribe to our Newsletter.


Here we have a ... element
surrounding an alternative markup, namely a Tapestry Checkbox component
disguised as an ordinary HTML control. Note that the value parameter of this
control has a value, subscribe, which is the same page property as the one that was
used for the test parameter of the surrounding If component.
The Checkbox component is also associated with a line of JavaScript that runs when
the check box is clicked on. This JavaScript simply submits the surrounding form:
onclick="this.form.submit()"
Simple Components
[ 114 ]
Let's see how all this works together. In the very beginning, when the Registration
page is rendered for the first time, the subscribe property will evaluate to false,
and so the check box that prompts the user to subscribe will be displayed (the
alternative content provided as the else parameter of the If component).


Pages:
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6