Feb 02, 2012, 6:36 AM
[CLOSED] Double load in combobox
Hello, I have the following combobox:
Thanks
<ext:ComboBox ID="ComboCiudad" runat="server" FieldLabel="Origen" IDMode="Static"
LabelWidth="50" Width="300" Hidden="true" StoreID="Store_Direccion" DisplayField="Ciudad"
ValueField="Codigo">
<Listeners>
<Expand Handler="#{Store_Direccion}.reload();" />
</Listeners>
</ext:ComboBox>
<ext:Store ID="Store_Direccion" runat="server" RemoteSort="true" AutoLoad="false">
<Proxy>
<%-- Proxy --%>
<ext:HttpProxy Json="false" Method="POST" Url="/Controles/DireccionService.asmx/getDirecciones">
</ext:HttpProxy>
</Proxy>
<Reader>
<ext:XmlReader Record="ws_ComboDirecciones" IDPath="Val1">
<Fields>
<%--Record Fields--%>
<ext:RecordField Name="DireccionText" />
<ext:RecordField Name="DireccionValue" />
<%--Fin Record Fields--%>
</Fields>
</ext:XmlReader>
</Reader>
<Listeners>
<LoadException Handler="Ext.MessageBox.alert('Error', response.statusText);" />
</Listeners>
</ext:Store>
I want that the combobox is loaded from the web service each time you expand. This works fine, but the first time that you expand the combobox, the webservice is called twice times. How can we prevent this? Thanks
Last edited by Daniil; Feb 02, 2012 at 9:31 AM.
Reason: [CLOSED]