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

Alexander Kolesnikov

"Tapestry 5: Building Web Applications"

Modify the onFormSubmit method to look like this:
void onSubmitFromRegistrationForm()
{
System.out.println("The form was submitted!");
if (unsubscribe) subscribe = false;
}
Now we can run the application. Go to the Registration page, click on the check box
to subscribe for the newsletter and then click on the other check box to restore the
original interface.
The only problem is that the text box for password doesn't redisplay its value when
the page is reloaded, despite the fact that we made password property persistent.
This is in the nature of the PasswordField component??”not to redisplay its value.
However, we don't want to annoy our user by the need to re-enter the password
every time the page is reloaded. What can we do to avoid this?
One possible solution is to hide the password fields as soon as the password
gets submitted. We can use another If component for this purpose. Modify the
Registration page template like this:



Label for password
:
t:id="password"
t:value="password"/>



Label for password 2
:
t:id="password2"
t:label="Repeat password" t:value="password2"/>


Chapter 4
[ 117 ]
From the test parameter of this If component, you can see that Tapestry will be
looking for the isPasswordNotSubmitted (or getPasswordNotSubmitted) method
in the page class.


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