[CLOSED] MultiSelect error

  1. #1

    [CLOSED] MultiSelect error

    Hi,

    Acording to the following example. Multiselect throws a js exception.
    It only crash with this layout configuration, without window seems to works fine. And if event an store use items works too.

    <ext:Viewport runat="server" Layout="FitLayout" AutoScroll="true">
            <Items>
                <ext:Window ID="FiltroWindow" runat="server" IconCls="filter-icon" Title="Filtro"
                    Width="636" Height="400" MinHeight="400" MinWidth="636" Hidden="false" Border="false"
                    Modal="true" Maximizable="true">
                    <Content>
                        <ext:Panel ID="filtroWrapper" runat="server" Layout="BorderLayout">
                            <Items>
                                <ext:Panel ID="filtroContainer" runat="server" Border="false" Layout="BorderLayout"
                                    Region="Center">
                                    <Items>
                                        <ext:Panel ID="filtroContainerWest" runat="server" Split="true" Region="West">
                                            <Items>
                                                <ext:TabPanel ID="tpComandos" runat="server" Border="false" Margins="0" Width="200">
                                                    <Items>
                                                        <ext:Panel ID="pnlCampos" runat="server" Title="Campos" Border="false" Layout="FitLayout">
                                                            <Items>
                                                                <ext:MultiSelect ID="lstCampos" runat="server" MultiSelect="false" AnchorVertical="100%"
                                                                    DisplayField="Etiqueta" ValueField="Etiqueta">
                                                                    <Store>
                                                                        <ext:Store ID="dsCampos" runat="server" AutoLoad="false" ShowWarningOnFailure="false">
                                                                            <Proxy>
                                                                                <ext:AjaxProxy Url='/Sample/ListaCampos' AutoDataBind="true">
                                                                                    <Reader>
                                                                                        <ext:JsonReader Root="data" />
                                                                                    </Reader>
                                                                                </ext:AjaxProxy>
                                                                            </Proxy>
                                                                            <Model>
                                                                                <ext:Model ID="modelCampos" runat="server">
                                                                                    <Fields>
                                                                                        <ext:ModelField Name="TipoConceptoFiltro" />
                                                                                        <ext:ModelField Name="Etiqueta" />
                                                                                        <ext:ModelField Name="EtiquetaSinTraducir" />
                                                                                        <ext:ModelField Name="Longitud" Type="Int" />
                                                                                        <ext:ModelField Name="IsVisible" Type="Boolean" />
                                                                                        <ext:ModelField Name="Tabla" />
                                                                                    </Fields>
                                                                                </ext:Model>
                                                                            </Model>
                                                                            <Parameters>
                                                                                <ext:StoreParameter Name="TipoFiltro" Value='sss' Mode="Value" AutoDataBind="true" />
                                                                            </Parameters>
                                                                        </ext:Store>
                                                                    </Store>
                                                                </ext:MultiSelect>
                                                            </Items>
                                                        </ext:Panel>
                                                    </Items>
                                                </ext:TabPanel>
                                            </Items>
                                        </ext:Panel>
                                    </Items>
                                </ext:Panel>
                            </Items>
                        </ext:Panel>
                    </Content>
                    <Buttons>
                        <ext:Button ID="btnFiltroAceptar" runat="server" Text="sm_txt_aceptar" />
                        <ext:Button ID="btnFiltroCancelar" runat="server" Text="sm_txt_cancelar" />
                    </Buttons>
                </ext:Window>
            </Items>
        </ext:Viewport>
    Any solution?
    Last edited by Daniil; Jun 15, 2012 at 1:57 PM. Reason: [CLOSED]
  2. #2
    Hi,

    What is the JS exception? Please always provide more details about errors.

    I would apply the following changes.

    1. There is no layout in Window. I would set up
    Layout="FitLayout"
    2. Replace Window
    <Content>
    with
    <Items>
    3. BorderLayout requires a Center region to be set up. The "filtroContainer" Panel with BorderLayout has no Center region. So, please put:
    <ext:Panel runat="server" Region="Center" />
    into its Items.
  3. #3
    With it changes excepting Content for Items because in full version of app this is a Content embedding the same ext.net code (to reuse the control).

    I have the same error in this function of Ext MultiSelect JS ( Ext.define('Ext.ux.form.MultiSelect', { ... })
    getRecordsForValue: function(value){
            var me = this,
                records = [],
                all = me.store.getRange(),
                valueField = me.valueField,
                i = 0,
                allLen = all.length,
                rec,
                j,
                valueLen;
                
            for (valueLen = value.length; i < valueLen; ++i) { // <-- ERROR HERE
                for (j = 0; j < allLen; ++j) {
                    rec = all[j];   
                    if (rec.get(valueField) == value[i]) {
                        records.push(rec);
                    }
                }    
            }
                
            return records;
        },
  4. #4
    This bug has been recently fixed, please update from SVN.
  5. #5
    I'm via NuGET... I'll try in next nuget update.

Similar Threads

  1. Replies: 4
    Last Post: May 09, 2012, 9:24 PM
  2. Replies: 4
    Last Post: Feb 20, 2012, 11:14 AM
  3. [CLOSED] JavaScript error in IE after loading MultiSelect from Popup
    By jthompson in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Apr 26, 2011, 12:52 PM
  4. Replies: 0
    Last Post: Mar 09, 2010, 7:28 AM
  5. [CLOSED] JavaScript error with MultiSelect inside BorderLayout and TabPanel
    By martin.mosimann in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Aug 25, 2009, 1:03 PM

Tags for this Thread

Posting Permissions