May 13, 2013, 12:25 PM
[CLOSED] AllowBlank="false" prevent formpanel to submit on the front?
although I set AllowBlank="false" to the textfield property , but textfield is blank and click the button , the process run to the server code.
how to prevent to run to server when textfield is blank.
how to prevent to run to server when textfield is blank.
<ext:FormPanel
ID="w_login"
runat="server"
Closable="false"
Resizable="false"
Title="用户登陆"
Draggable="false"
DefaultButton="btnLogin" Layout="VBoxLayout">
<Items>
<ext:TextField
ID="txtUsername"
runat="server"
FieldLabel="用户名" LabelAlign="Right"
AllowBlank="false"
BlankText="请输入用户名">
<Listeners>
<AfterRender Handler="#{txtUsername}.focus(false,200);">
</AfterRender>
</Listeners>
</ext:TextField>
<ext:TextField
ID="txtPassword"
runat="server"
InputType="Password" LabelAlign="Right"
FieldLabel="密码"
AllowBlank="false"
BlankText="请输入密码" />
</Items>
<Buttons>
<ext:Button ID="btnLogin" runat="server" Text="登陆" Icon="DoorIn">
<DirectEvents>
<Click OnEvent="btnLogin_Click">
<EventMask ShowMask="true" Msg="正在验证..." MinDelay="500" />
</Click>
</DirectEvents>
</ext:Button>
</Buttons>
</ext:FormPanel>
Last edited by Daniil; May 16, 2013 at 3:39 AM.
Reason: [CLOSED]