Hi,
I think you have to be sure that you do not send an unencrypted
password across the wire...
That said, I think you can post back the value to the server and
update the PasswordStrengthMeter with that.
Or you could use Javascript to make it all client-side.
It all depends on implementation if you could reuse classes from my
blog post.
I think you can use standard Ajax behaviors to update the
PasswordStrengthMeter. After that, you could use standard form
validation to validate the strength of the password. With my code, you
can display an error next to the password field and highlight it.
- Daan
Op 22 apr 2009, om 17:52 heeft Tauren Mills het volgende geschreven:
Daan,
Yes, this definitely looks like the direction I should go for most of
my form components. Thanks for sharing it!
However, I also need to make a PasswordStrengthMeter, which will show
different values (and css styling) based on the strength of a password
entered into a password field. Something like one of these:
http://ui-patterns.com/pattern/PasswordStrengthMeter
http://ui-patterns.com/userset/39/image/1104#focus
Before I embark on building it, do you have any suggestions on easy
ways to use your solution to do this?
Thanks!
Tauren
On Tue, Apr 21, 2009 at 10:18 PM, nino martinez wael
<[email protected]> wrote:
Yeah looks like the way Tauren should go.. Did'nt know that was what
he was looking fore..
2009/4/22 Daan van Etten <[email protected]>:
Hi Tauren,
A while ago I wrote this article, which may give you some hints on
how to
achieve this:
http://stuq.nl/weblog/2008-09-03/user-friendly-form-validation-with-wicket
Regards,
Daan
Op 21 apr 2009, om 17:36 heeft Tauren Mills het volgende geschreven:
Thanks Nino,
Actually, I want just one error message right next to the
username field
that is specific to the username. I also want to highlight via
css the
username field. A messagepanel would list errors in other fields
as well,
wouldn't it?
Tauren
On Apr 21, 2009 5:06 AM, "nino martinez wael"
<[email protected]>
wrote:
Hmm, it happens automatically, a validator can register errors..
Like
this:
form.add(new TextField<String>("email",new
PropertyModel<String>(form.getModel(),"email")).add(
EmailAddressValidator.getInstance()).add(new
IValidator() {
public void validate(IValidatable
validatable) {
String string = (String)
validatable.getValue();
if
(userRepository.areEmailThere(string)) {
validatable.error(new
ValidationError().addMessageKey(
"error.unique").setVariable("email",
validatable.getValue()));
}
}
}));
form.add(new CheckBox("agree", new
Model<Boolean>(false))
.add(new IValidator<Boolean>() {
public void
validate(IValidatable<Boolean> validatable) {
Boolean agree =
validatable.getValue();
if (!agree) {
validatable.error(new
ValidationError()
.addMessageKey("error.mustagree"));
}
}
}));
And then just in your ajax add the error message panel to the
response.. Works just fine... Or is it something more you want?
2009/4/21 Tauren Mills <[email protected]>:
On a site registration form, I have three validators on the
username >
field. One tests to make s...
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]