Feb 14, 2015, 6:41 AM
[CLOSED] TabIndex is not working
I have this form, but when I open the window, the tabindex sequence isnot working.
In codebehind, I set the 'focus' to the first textfield, but when I press tabkey, I hope after the textfield, must follow the checkbox, and later the buttons. But after the textfield, the focus goes to the url direction of the browser. I tested it on firefox and IE.
I started didnt put the tabindex tag, I had the situation I commented, after I put the tabindex tab, but I got the same result.
This is the code:
In codebehind, I set the 'focus' to the first textfield, but when I press tabkey, I hope after the textfield, must follow the checkbox, and later the buttons. But after the textfield, the focus goes to the url direction of the browser. I tested it on firefox and IE.
I started didnt put the tabindex tag, I had the situation I commented, after I put the tabindex tab, but I got the same result.
This is the code:
<ext:GridPanel
id="grdR"
Width="370"
Height="375"
runat="server">
<Store>
<ext:Store runat="server" PageSize="10" RemoteSort="true">
<Proxy>
<ext:AjaxProxy Url="../../ashx/dal/Rol.ashx">
<ExtraParams>
<ext:Parameter Name="t" Value="1" />
</ExtraParams>
<Reader>
<ext:JsonReader RootProperty="data" TotalProperty="total" />
</Reader>
<Listeners>
<Exception Handler="Ext.MessageBox.alert('Carga de Informacion Fallo...', response.statusText);" />
</Listeners>
</ext:AjaxProxy>
</Proxy>
<Model>
<ext:Model runat="server" IDProperty="Id">
<Fields>
<ext:ModelField Name="Id" />
<ext:ModelField Name="Descripcion" />
<ext:ModelField Name="Estatus" Type="Boolean" />
</Fields>
</ext:Model>
</Model>
<Sorters>
<ext:DataSorter Property="Descripcion" Direction="ASC" />
</Sorters>
</ext:Store>
</Store>
<TopBar>
<ext:ToolBar runat="server">
<Items>
<ext:Button runat="server" Icon="Add" Text="Nuevo Rol">
<DirectEvents>
<Click OnEvent="grdRShow">
<ExtraParams>
<ext:Parameter Name="x" Value="0" Mode="Raw" />
</ExtraParams>
<EventMask ShowMask="true" Msg="Cargando..." />
</Click>
</DirectEvents>
</ext:Button>
</Items>
</ext:ToolBar>
</TopBar>
<ColumnModel runat="server">
<Columns>
<ext:CommandColumn runat="server" Width="25">
<Commands>
<ext:GridCommand Icon="BulletEdit" CommandName="RP" />
</Commands>
<DirectEvents>
<Command OnEvent="grdRShow" Success="top.GApp.wndHdr(#{wndR},2);">
<EventMask ShowMask="true" CustomTarget="={#{grdR}.body}" />
<ExtraParams>
<ext:Parameter Name="x" Value="record.getId()" Mode="Raw" />
</ExtraParams>
</Command>
</DirectEvents>
</ext:CommandColumn>
<ext:Column runat="server" Text="Descripcion" DataIndex="Descripcion" Width="270" />
<ext:BooleanColumn runat="server" Text="Activo" TrueText="Si" FalseText="No" DataIndex="Estatus" Width="45" />
</Columns>
</ColumnModel>
<Plugins>
<ext:FilterHeader runat="server" Remote="true" />
</Plugins>
<SelectionModel>
<ext:RowSelectionModel runat="server" Mode="Single" />
</SelectionModel>
<BottomBar>
<ext:PagingToolbar runat="server" DisplayInfo="true" DisplayMsg="Roles {0} - {1} de {2}" EmptyMsg="No existen Roles"/>
</BottomBar>
</ext:GridPanel>
<ext:Window
ID="wndR"
runat="server"
Icon="User"
Title="Rol"
Width="380"
Height="170"
AutoScroll="true"
AutoShow="false"
Modal="true"
Hidden="true">
<Items>
<ext:FormPanel
ID="frmR"
runat="server"
BodyPadding="2"
Width="365"
DefaultAnchor="100%"
AutoScroll="True">
<Defaults>
<ext:Parameter Name="MsgTarget" Value="side" />
</Defaults>
<Items>
<ext:Hidden runat="server" ID="x" Text="0" />
<ext:TextField runat="server" FieldLabel="Descripcion" ID="tR" Name="tr" AllowBlank="false" MaxLength="25" EnforceMaxLength="true" FieldCls="bygl" TabIndex="0"/>
<ext:Checkbox ID="chkR" runat="server" FieldLabel="Activo" Name="ckr" TabIndex="1"/>
<ext:FieldSet runat="server" Collapsed="false" Collapsible="false" Title="Actualizacion" Width="280" Border="false" Cls="cb fs9">
<Items>
<ext:Label ID="lfR" runat="server" Name="lfr" Cls="cgr fs9" />
<ext:Label ID="luR" runat="server" Name="lur" Cls="cgr fs9"/>
</Items>
</ext:FieldSet>
</Items>
<Buttons>
<ext:Button runat="server" Text="Nuevo" Icon="Add" TabIndex="2">
<DirectEvents>
<Click OnEvent="btnRNew">
<EventMask ShowMask="true" Msg="Procesando Informacion..." />
</Click>
</DirectEvents>
<Listeners>
<Click Handler="top.GApp.wndHdr(#{wndR},1);" />
</Listeners>
</ext:Button>
<ext:Button id="btnR" runat="server" Icon="DatabaseSave" Text="Guarda" TabIndex="3">
<DirectEvents>
<Click OnEvent="frmRSave" before="return #{frmR}.isValid();" Success="#{grdR}.store.reload();#{btnP}.setDisabled(false);#{btnU}.setDisabled(false);">
<ExtraParams>
<ext:Parameter Name="values" Value="#{frmR}.getForm().getValues()" Mode="Raw" Encode="true" />
</ExtraParams>
<EventMask ShowMask="true" Msg="Procesando Informacion..." />
</Click>
</DirectEvents>
</ext:Button>
<ext:Button id="btnP" runat="server" Icon="Key" Text="Permisos" Disabled="true" TabIndex="4">
<DirectEvents>
<Click OnEvent="btnPWnd" >
<EventMask ShowMask="true" Msg="Cargando Permisos..." />
<ExtraParams>
<ext:Parameter Name="x" Value="#{x}.getValue()" Mode="Raw" />
</ExtraParams>
</Click>
</DirectEvents>
</ext:Button>
<ext:Button id="btnU" runat="server" Icon="GroupKey" Text="Usuarios" Disabled="true" TabIndex="5">
<DirectEvents>
<Click OnEvent="btnUWnd" >
<EventMask ShowMask="true" Msg="Cargando Usuarios..." />
<ExtraParams>
<ext:Parameter Name="x" Value="#{x}.getValue()" Mode="Raw" />
</ExtraParams>
</Click>
</DirectEvents>
</ext:Button>
</Buttons>
</ext:FormPanel>
</Items>
</ext:Window>
Last edited by Daniil; Feb 18, 2015 at 7:24 AM.
Reason: [CLOSED]