wowthnx you very much for the explanation...thnx u
On Sat, Feb 28, 2009 at 12:04 AM, nille hammer
tapestry.nilleham...@winfonet.eu wrote:
Hi dwi,
you do not need the password to be output to implement that feature. In
fact it is very insecure and uncommon to implement something like Your
current passoword is: xxx . This would mean you had to store the password
in clear text. This as Thiago already pointed out is insecure.
Think of the password-Field as a one way street. Values submitted by the
user are used to update the values on the server side, but the content of
those values is not sent back to the client. To implement the password
change. Provide a form with two password fields and check wether the values
entered by the user do match. If they do, change password, if not send error
message. Right now I have no IDE at hand so cannot provide you with tested
example code. But I think something like the follwowingshould work
tml-file:
t:form t:id=myForm
t:label for=pw1 /
t:passwordfield value=pw1 t:id=pw1 validate=required /
t:label for=pw2
t:passwordfield value=pw2 t:id=pw2 validate=required /
t:submit t:id=send/
/t:form
Page class:
@Component
private Form myForm; // links to t:form t:id=myForm
@Component
private PasswordField pw1; // links to t:passwordfield
t:id=pw1
@Property
private String pw1;
@Property
private String pw2;
Object onValidateForm() {
if (this.pw1 == null || !this.pw1.equals(this.pw2)) {
myForm.recordError(pw1, Passwords do not match);
}
Kind Regards, nillehammer
--
http://www.winfonet.eu
-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org
--
http://dwiardiirawan.blogspot.com
cos everyone could be extraordinary...lighten up !