ComboBox inside FormPanel

  1. #1

    ComboBox inside FormPanel

    Hi folks, i´m having some problems when binding a combobox inside a form panel.

    1 - Combobox in FormPanel

    When i bind an entity to the FormPanel how do i notify the combobox to load the "sub" entity that is linked to the TipoDeLogradouroID.


    <%--LOGRADOURO--%>
        <ext:Store ID="_strLogradouro" runat="server" OnRefreshData="CarregarEntidade">
            <DirectEventConfig ViewStateMode="Enabled" />
            <AutoLoadParams>
                <ext:Parameter Name="start" Value="={0}" />
            </AutoLoadParams>
            <Proxy>
                <ext:PageProxy />
            </Proxy>
            <Reader>
                <ext:JsonReader IDProperty="ID">
                    <Fields>
                        <ext:RecordField Name="ID" Mapping="ID" />
                        <ext:RecordField Name="Nome" Mapping="Nome" />
                        <ext:RecordField Name="TipoDeLogradouroID" Mapping="TipoDeLogradouroID" />
                    </Fields>
                </ext:JsonReader>
            </Reader>
            <Listeners>
                <DataChanged Fn="myValidateRecord" />
            </Listeners>
        </ext:Store>
        <%--VIEWPORT--%>
        <ext:Viewport ID="_vwpCorpoAtualizacao" runat="server">
            <Items>
                <ext:FormPanel ID="_fpnlLogradouro" IDMode="Static" Border="false" runat="server">
                    <Items>
                        <%--TIPO DE LOGRADOURO--%>
                        <ext:ComboBox ID="_cbTipoDeLogradouro" DataIndex="TipoDeLogradouroID" IDMode="Static" runat="server" ViewStateMode="Enabled"
                            ForceSelection="true" FieldLabel="Tipo de Logradouro"
                            DisplayField="Nome" ValueField="ID" TypeAhead="false" LoadingText="Pesquisando Tipos de Logradouro..."
                            ItemSelector="tr.list-item" TriggerAction="Query" MinChars="1" AllowBlank="false"
                            BlankText="Informe o tipo">
                            <Store>
                                <ext:Store ID="_strTipoDeLogradouro" runat="server" AutoLoad="false" OnRefreshData="_strTipoDeLogradouro_RefreshData">
                                    <Proxy>
                                        <ext:PageProxy />
                                    </Proxy>
                                    <Reader>
                                        <ext:JsonReader IDProperty="ID">
                                            <Fields>
                                                <ext:RecordField Name="ID" />
                                                <ext:RecordField Name="Nome" />
                                            </Fields>
                                        </ext:JsonReader>
                                    </Reader>
                                </ext:Store>
                            </Store>
                        </ext:ComboBox>
                    </Items>
                </ext:FormPanel>
            </Items>
        </ext:Viewport>
    Last edited by geoffrey.mcgill; Nov 10, 2010 at 5:25 PM. Reason: please use [CODE] tags
  2. #2

    OR

    how do i set the SelectIndex of a combobox that is bound to a Store that has a PageProxy (It always throws exception)

Similar Threads

  1. Replies: 8
    Last Post: Aug 09, 2012, 1:49 PM
  2. GridPanel inside a FormPanel
    By cajun in forum 1.x Help
    Replies: 1
    Last Post: May 08, 2012, 1:36 PM
  3. TabPanel validation without FormPanel inside
    By AlexMaslakov in forum 1.x Help
    Replies: 5
    Last Post: Sep 09, 2011, 9:20 AM
  4. Replies: 2
    Last Post: Sep 21, 2010, 11:14 AM
  5. ChooserDialog inside formpanel
    By 78fede78 in forum Bugs
    Replies: 2
    Last Post: Jun 28, 2010, 2:39 PM

Posting Permissions