Nov 10, 2010, 4:02 PM
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.
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