-
FEATURED COMPONENTS
First time here? Check out the FAQ!
<label value="${lbl:name('Password')}" />
<span class="req"></span>
<textbox id="txtUSR_PASSWORD" type="password" value="@{appuser.USR_PASSWORD}" width="80%" readonly="false"
constraint="" onChange='' />
<label value="${lbl:name('Password Hint')}" />
<span class="req"></span>
<textbox id="txtUSR_PASSWORD1" type="password" value="@{appuser.USR_PASSWORD}" width="80%" readonly="false"
constraint="" onChange='' />
I think you have to check it while typing,for that you can write your code in
onChange="@command('checkPassword')"
and create a method with same name in your your VM ,Inside the method you can check whether the text value is same as needed.for confirmation you can change the textbox background from red to green or whatever sign you like to prefer.
You need to bind this value to VM.
or use like :
onChange="@command('checkPassword' ,password= appuser.USR_PAS)"
also for functionality over "ENTER" button ,include
onOK="@command('checkPassword')" .
If I understand you correctly you would like to validate that both passwords are the same. For this cases where 2 fields need to be validated against each other you could refer to Dependent Property Validation. If this does not help or I got your question wrong please provide more details on what you are trying to achieve and which version of ZK you are using.
You can also do using JSR 303 Validation . Check my Example here
Asked: 2013-07-24 02:44:46 +0800
Seen: 42 times
Last updated: Jul 25 '13
composite component help [closed]
EL in a forEach @command not working?
Different template for each grid row
Cardlayout animation is broken
Grid RowRender slow using 6.5.1 and sizable=true
setVisible(false), component will load or not
Decimalbox and doublebox value rounded on iPad
history management with page status