Jan 11, 2016, 3:58 AM
[OPEN] [#1220] [3.2.1] Window Close Issue
Good morning.
I build my page as follows:
2. When window shown, the user can perform search in textbox inside the form panel.
3. This textbox respond to search action by simply Enter key hit.
5. When I hit Enter key to perform search operation, the result display successfully in GridPanel inside window but the window GET CLOSED automatically.
6. If I want to see the result of the search operation, I should open the window again.
Why I'm getting this strange behavior?
I build my page as follows:
<ext:Viewport runat="server" Layout="FitLayout">
<Items>
<ext:GridPanel
runat="server"
ID="SearchResultGV"
ClientIDMode="Static"
EmptyText="No result found"
Title="Membership Inquiry"
BodyCls="my-carousel"
AutoScroll="true"
Icon="Magnifier"
Frame="true">
....
</ext:GridPanel>
</Items>
</ext:Viewport>
<ext:Window
ID="OtherSearchOptionsWindow"
runat="server"
Icon="User"
Hidden="true"
Closable="true"
DefaultButtonStopEvent="true"
MarginSpec="0 0 0 0"
PaddingSpec="0 0 0 0"
Title="Search Options"
Width="850"
Height="500"
ClientIDMode="Static"
Resizable="false"
Layout="FitLayout">
<Listeners>
<Show Handler="positionWindow(this);"/>
</Listeners>
<Items>
<ext:FormPanel
ID="OtherSearchOptionsWindowPnl"
runat="server"
MarginSpec="0 0 0 0"
PaddingSpec="0 0 0 0"
Frame="false"
ButtonAlign="Right"
Layout="FitLayout">
....
</ext:FormPanel>
</Items>
</ext:Window>
1. Window is hidden by default and this property set false based on user request. 2. When window shown, the user can perform search in textbox inside the form panel.
3. This textbox respond to search action by simply Enter key hit.
<ext:TextField
runat="server"
LabelAlign="Left"
Width="350"
ClientIDMode="Static"
ID="txtSearchOtherOptions"
AllowBlank="false"
FieldLabel="Search Criteria"
LabelWidth="125">
<KeyMap runat="server">
<Binding>
<ext:KeyBinding Handler="if (!#{txtSearchOtherOptions}.validate()) { Ext.Msg.alert('Error','The Search Criteria field is required'); return false; } else { #{DirectMethods}.searchOtherOptions(); }">
<Keys>
<ext:Key Code="Enter" />
</Keys>
</ext:KeyBinding>
</Binding>
</KeyMap>
</ext:TextField>
4. When I perform search operation, I display result in same window.5. When I hit Enter key to perform search operation, the result display successfully in GridPanel inside window but the window GET CLOSED automatically.
6. If I want to see the result of the search operation, I should open the window again.
Why I'm getting this strange behavior?