PDA

View Full Version : [CLOSED] Password matching



ViDom
Jun 20, 2013, 11:51 AM
Hi,
here is my Control which should match 2 password and check if it's equals, but for now it's always make invalid even when 2 possword are equals:


<ext:Container runat="server" ID="contChange" Layout="FitLayout">
<Items>
<ext:FormPanel runat="server" ID="pnlChangePass"
AutoDoLayout="True" Frame="True" MonitorValid="True">
<Items>
<ext:TextField runat="server"
ID="txtOldPass"
FieldLabel="Old password"
InputType="Password"
AnchorHorizontal="100%"
IsRemoteValidation="True">
<RemoteValidation onValidation ="CheckPassword"/>
</ext:TextField>

<ext:TextField
ID="txtPasswordField"
runat="server"
FieldLabel="New password"
InputType="Password"
AnchorHorizontal="82%"
AllowBlank="False">
<Listeners>
<ValidityChange Handler="this.next().validate();" />
<Blur Handler="this.next().validate();" />
</Listeners>
</ext:TextField>
<ext:TextField ID="txtPasswordConfirm"
runat="server"
Vtype="password"
FieldLabel="Confirm password"
InputType="Password"
MsgTarget="Qtip"
AllowBlank="False"
AnchorHorizontal="82%">
<CustomConfig>
<ext:ConfigItem Name="initialPassField" Value="txtPasswordField" Mode="Value" />
</CustomConfig>
</ext:TextField>
<ext:Label runat="server" ID="lblStatus" Visible="True" Cls="statusLabel"></ext:Label>
</Items>
<Listeners>
<ValidityChange Handler="#{btnChange}.setDisabled(!isValid);"/>
</Listeners>
<Buttons>
<ext:Button runat="server"
ID="btnChange"
FormBind="True"
Disabled="True"
Text="Save">
<DirectEvents>
<Click onEvent="Click_Event"></Click>
</DirectEvents>
</ext:Button>
</Buttons>
</ext:FormPanel>
</Items>
</ext:Container>


What am I missing or doing wrong here?

Thanks,
ViDom

Vladimir
Jun 20, 2013, 1:11 PM
Please replace 'isValid' by 'valid'


<ValidityChange Handler="#{btnChange}.setDisabled(!valid);"/>

ViDom
Jun 20, 2013, 1:31 PM
Please replace 'isValid' by 'valid'


<ValidityChange Handler="#{btnChange}.setDisabled(!valid);"/>


at first I've got there !valid instead of isValid(then I checked on Examples listeners arguments that there is isValid argument . Please explain why there is valid instead of isValid which is argument of ValidityChange in your examples?

Anyway This change makes no changes at all still always 2 passwords are not same (even when they are)

Vladimir
Jun 20, 2013, 3:14 PM
at first I've got there !valid instead of isValid(then I checked on Examples listeners arguments that there is isValid argument . Please explain why there is valid instead of isValid which is argument of ValidityChange in your examples?

I see 'valid' argument in the following sample for FormPanel and ValidityChange event
http://examples2.ext.net/#/Events/Listeners/Arguments/



Anyway This change makes no changes at all still always 2 passwords are not same (even when they are)

I cannot reproduce it, for me validation works fine (tested with latest code)

ViDom
Jun 21, 2013, 11:47 AM
I see 'valid' argument in the following sample for FormPanel and ValidityChange event
http://examples2.ext.net/#/Events/Listeners/Arguments/


I cannot reproduce it, for me validation works fine (tested with latest code)

only different I can see is that I've open this control in Frame mode of Ext.Net.Window. Can it causing it stop working as should?

Daniil
Jun 21, 2013, 12:27 PM
I think, hardly.

Please provide a full simplified sample how you are exactly trying. By the way, are you using the latest Ext.NET sources from SVN trunk?

ViDom
Jun 21, 2013, 12:31 PM
I think, hardly.

Please provide a full simplified sample how you are exactly trying. By the way, are you using the latest Ext.NET sources from SVN trunk?

I guess I'm using v 2.2.0.32314 is it latest? Today I builded it but for sure need confirmation:)

Daniil
Jun 21, 2013, 1:32 PM
2.2.0.32314

The last numbers doesn't tell us much, because they depends on build time.
Version numbers in a compiled assembly (http://blogs.msdn.com/b/carloc/archive/2008/02/22/the-meaning-of-version-numbers-in-a-compiled-assembly.aspx)


Today I builded

Did you update from the trunk, right?
http://svn.ext.net/premium/trunk/

ViDom
Jun 21, 2013, 1:49 PM
The last numbers doesn't tell us much, because they depends on build time.
Version numbers in a compiled assembly (http://blogs.msdn.com/b/carloc/archive/2008/02/22/the-meaning-of-version-numbers-in-a-compiled-assembly.aspx)



Did you update from the trunk, right?
http://svn.ext.net/premium/trunk/

yes I did update from trunk

Daniil
Jun 21, 2013, 2:41 PM
OK, clarified. Then this gets actual.

Please provide a full simplified sample how you are exactly trying.