ExtraParams get current item

  1. #1

    ExtraParams get current item

    Hi,

    I have a combobox and a store. On event select I want to return only the current item selected. Thus the store is returned complete.
    Value="#{StoreGrupoTipoDocumentoID}.getRecordsValues()"
    Store
    <ext:Store ID="StoreGrupoTipoDocumentoID" runat="server" AutoLoad="true" Restful ="true" >
            <Proxy>
                <ext:HttpProxy  Json="true"  Method="GET" Url ="http://localhost:8000/GrupoDocumentos?$format=json&$expand=tiposdocumento"/> 
            </Proxy>            
            <Reader>                                                        
                <ext:JsonReader Root="d.results" IDProperty="id" >
                    <Fields>
                        <ext:RecordField Name="id"  />
                        <ext:RecordField Name="nome" /> 
                        <ext:RecordField Name="tiposdocumento"/>                                                                                                                                            
                    </Fields>
                </ext:JsonReader>
            </Reader>
        </ext:Store>
    Combobox
    <ext:ComboBox ID="CbxGrupoTipoDocumentoID" runat="server" 
                                                              LoadingText="Aguarde..."
                                                              LabelAlign="Top"    
                                                              TypeAhead="true"                                                           
                                                              ForceSelection="true"                                                                                                                
                                                              DisplayField="nome"                                                          
                                                              ValueField="id"
                                                              TriggerAction="All" 
                                                              SelectOnFocus="true"
                                                              StoreID="StoreGrupoTipoDocumentoID"
                                                              EmptyText="... Selecione ... ">  
                                                        
                                                    <DirectEvents>
                                                        <Select OnEvent="RetornaJsonGrupoDocumento">
                                                            <ExtraParams>
                                                                <ext:Parameter
                                                                    Name="values"
                                                                    Value="#{StoreGrupoTipoDocumentoID}.getRecordsValues()"
                                                                    Mode="Raw"
                                                                    Encode="true" />
                                                            </ExtraParams>
                                                        </Select>
                                                    </DirectEvents>                                                                                                                                                                                       
                                                </ext:ComboBox>
    Best Regards,

    Gustavo
  2. #2
    Hi,

    Please try
    record.data
    instead of
    #{StoreGrupoTipoDocumentoID}.getRecordsValues()
  3. #3
    Very cool Daniil.

    Thanks !!

Similar Threads

  1. Replies: 2
    Last Post: Dec 22, 2011, 3:45 PM
  2. Replies: 2
    Last Post: Sep 04, 2011, 5:51 PM
  3. Replies: 13
    Last Post: Aug 11, 2011, 7:11 AM
  4. Replies: 6
    Last Post: Aug 01, 2011, 5:53 PM
  5. Replies: 1
    Last Post: Jun 01, 2009, 6:15 PM

Tags for this Thread

Posting Permissions