Can't get three cascading comboboxes to work (two work fine)

  1. #1

    Can't get three cascading comboboxes to work (two work fine)

    I have three stores tied to three ComboBoxes that I want to populate in order (cascading) during the initial page load. However, I cannot get the third ComboBox (ID=DropDownList_Lines) to populate. The problem seems to be that the stores don't load in the correct order. Most of the time, store 3 loads before store 2 which causes the parameters passed to store 2 to be empty. Although sometimes (rarely) the stores do get called in the correct order but the parameter from the Dates ComboBox is always empty anyway.

    Store1 (LocationsStore) is populated during page_load() and it triggers the cascading action.

    Everything works fine if I manually select values, the problem is only on the initial load of the page.

    Here are my stores:

    <ext:Store ID="LocationsStore" runat="server" AutoLoad="true">
        <Reader>
            <ext:ArrayReader>
                <Fields>
                    <ext:RecordField Name="id" />
                </Fields>
            </ext:ArrayReader>
        </Reader>
        <Listeners>
            <Load Handler="#{DropDownList_Locations}.setValue(#{DropDownList_Locations}.store.getAt(0).get('id'));" />
        </Listeners> 
    </ext:Store>
    
    <ext:Store runat="server" ID="DatesStore">
        <Proxy>
            <ext:HttpProxy runat="server" Method="POST" Url="BillsWebService.asmx/GetDates" />
        </Proxy>
        <Reader>
            <ext:XmlReader Record="ValueId">
                <Fields>
                    <ext:RecordField Name="dId" Type="String" Mapping="Id" />
                    <ext:RecordField Name="dValue" Type="String" Mapping="Value" />
                </Fields>
            </ext:XmlReader>
        </Reader>
        <BaseParams>
            <ext:Parameter Name="Store" Value="#{DropDownList_Locations}.getValue()" Mode="Raw" /> 
        </BaseParams>
        <Listeners>
            <Load Handler="#{DropDownList_Dates}.setValue(#{DropDownList_Dates}.store.getAt(0).get('dId'));" />
        </Listeners> 
    </ext:Store> 
    
    
    
    
    
    <ext:Store runat="server" ID="LinesStore">
        <Proxy>
            <ext:HttpProxy runat="server" Method="POST" Url="BillsWebService.asmx/GetLines" />
        </Proxy>
        <Reader>
            <ext:XmlReader Record="ValueId">
                <Fields>
                    <ext:RecordField Name="lId" Type="String" Mapping="Id" />
                    <ext:RecordField Name="lValue" Type="String" Mapping="Value" />
                </Fields>
            </ext:XmlReader>
        </Reader>
        <BaseParams>
            <ext:Parameter Name="locName" Value="#{DropDownList_Locations}.getValue()" Mode="Raw" /> 
            <ext:Parameter Name="billId" Value="#{DropDownList_Dates}.getValue()" Mode="Raw" /> 
        </BaseParams>
        <Listeners>
            <Load Handler="#{DropDownList_Lines}.setValue(#{DropDownList_Lines}.store.getAt(0).get('lId'));" />
        </Listeners> 
    </ext:Store>
    And here are my three ComboBoxes

    <ext:ComboBox  ID="DropDownList_Locations"  runat="server"  Editable="false" TypeAhead="true" DisplayField="id" ValueField="id" Mode="Local" TriggerAction="All" SelectOnFocus="true" StoreID="LocationsStore" > 
    <Listeners>
        <Select Handler="#{DropDownList_Dates}.clearValue();#{DatesStore}.load();#{LinesStore}.removeAll();#{DropDownList_Lines}.clearValue();" />
    </Listeners>
    </ext:ComboBox>
    
    
    <ext:ComboBox ID="DropDownList_Dates" runat="server" StoreID="DatesStore" Editable="false" TypeAhead="true" Mode="Local" ForceSelection="true" TriggerAction="All" DisplayField="dValue" ValueField="dId" EmptyText="Select a date" ValueNotFoundText="Value Not Found...">
    <Listeners>
        <Select Handler="#{DropDownList_Lines}.clearValue();#{LinesStore}.load();" />
    </Listeners>
    </ext:ComboBox>
    
    
    <ext:ComboBox ID="DropDownList_Lines" runat="server" StoreID="LinesStore" Editable="false" TypeAhead="true" Mode="Local" ForceSelection="true" TriggerAction="All" DisplayField="lValue" ValueField="lId" EmptyText="Select a line" ValueNotFoundText="Value Not Found...">
    </ext:ComboBox>
  2. #2

    RE: Can't get three cascading comboboxes to work (two work fine)

    Looks like it's been solved in this topic:
    Premium Help - [CLOSED] Can't get three cascading comboboxes...
    http://forums.ext.net/showthread.php...ighlight=panel

    - Peter
  3. #3

    RE: Can't get three cascading comboboxes to work (two work fine)

    Thanks for adding the link Peter. I had meant to do it but got side tracked.

Similar Threads

  1. Ext.Net does not work under IE9
    By nov30th in forum 1.x Help
    Replies: 13
    Last Post: Feb 14, 2012, 10:08 AM
  2. Replies: 1
    Last Post: Jul 22, 2011, 10:33 AM
  3. MVC Ext.Net isn't work
    By flaviodamaia in forum Bugs
    Replies: 2
    Last Post: Jun 30, 2010, 5:44 PM
  4. Replies: 3
    Last Post: Jul 01, 2009, 6:27 AM
  5. [CLOSED] Can't get three cascading comboboxes to work
    By harafeh in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Mar 13, 2009, 2:58 PM

Posting Permissions