Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Issue with MultipleFileItem

    Hello,
    Using SmartGWT Power 2013-01-22.
    I have a form with a MultiFileItem, the attachment are saved normally but with no foreign key set.
    Another problem is that after adding a file in the picker and clicking OK, it doesn't appear in the MultiFileItem grid list.

    Here's the detail datasource:
    Code:
    <DataSource ID="anexoRelDiario" tableName="DB_FISCALIZACAO.TBL_ANEXO_REL_DIARIO" serverType="sql">
    	<fields>
    		<field type="sequence" name="SQ_ANEXO_REL_DIARIO" primaryKey="true" hidden="true"
    			sequenceName="DB_FISCALIZACAO.SEQ_ANEXO_REL_DIARIO" />
    		<field name="legenda" title="Legenda" lenght="255" type="text" nativeName="TX_LEGENDA" />
    		<field name="tipoServico" title="Tipo de serviço" type="integer" nativeName="CD_TIPO_SERVICO">
    			<valueMap>
    				<value id="0">Serviços iniciados</value>
    				<value id="1">Serviços desenvolvidos no período</value>
    				<value id="2">Serviços concluídos</value>
    			</valueMap>
    		</field>
    		<field name="descricao" title="Descrição" length="4000" type="text" nativeName="TX_DESCRICAO" />
    		<field name="foto" type="binary" nativeName="IM_FOTO" />
    		<field name="IM_FOTO_filesize" type="integer" nativeName="NU_TAMANHO_FOTO" hidden="true" />
    		<field name="IM_FOTO_date_created" type="datetime" nativeName="DT_UPLOAD_FOTO" hidden="true" />
    		<field name="IM_FOTO_filename" type="text" title="Nome do arquivo anexado" nativeName="TX_NOME_FOTO" hidden="true" />
    		<field name="relDiario" type="integer" nativeName="CD_REL_DIARIO" foreignKey="relDiario.id" hidden="true" />
    	</fields>
    </DataSource>
    relDiario is the foreign key.

    Master datasource is:
    Code:
    <DataSource ID="relDiario" tableName="DB_FISCALIZACAO.TBL_REL_DIARIO" serverType="sql" inheritsFrom="relPlanoTrabalho">
          <fields>
            <field name="SQ_REL_DIARIO" sequenceName="DB_FISCALIZACAO.SEQ_REL_DIARIO" type="sequence" hidden="true" primaryKey="true" /> 
            .......
          </fields>
    </DataSource>
    Here are the logs from the RPC tab of ISC Console:

    DSRequest adding master record:
    Code:
    {
        dataSource:"relDiario", 
        operationType:"add", 
        componentId:"isc_DynamicForm_4", 
        data:{
            codigoEstado:120000, 
            agenteFinanceiro:"PM /BRASILEIA", 
            numTcPac:"CV-0344/10", 
            idPlanoTrabalho:"AC1009101643", 
            numProjeto:"AC1009101643", 
            faseProjeto:"Publicação de Convênio", 
            sistema:"siscon", 
            acao:"PMSB", 
            numAno:2010, 
            municipio:"BRASILEIA", 
            siglaAcao:"PMSB", 
            valorConcedente:204100, 
            siglaEstado:"AC", 
            tempoManha:"0", 
            tempoTarde:"0", 
            observacoes:"mkmkklllkml"
        }, 
        callback:{
            target:[DynamicForm ID:isc_DynamicForm_4], 
            methodName:"saveEditorReply"
        }, 
        showPrompt:true, 
        prompt:"Salvando formulário...", 
        oldValues:{
        }, 
        requestId:"relDiario$6279", 
        clientContext:{
        }, 
        useStrictJSON:true, 
        fallbackToEval:true, 
        afterFlowCallback:"isc_DynamicForm_4.$49z(dsRequest, dsResponse, data)", 
        editor:[DynamicForm ID:isc_DynamicForm_4], 
        bypassCache:true
    }
    DSResponse after adding master record:
    Code:
    [
        {
            data:[
                {
                    sistema:"siscon", 
                    acao:"PMSB", 
                    agenteFinanceiro:"PM /BRASILEIA", 
                    numTcPac:"CV-0344/10", 
                    SQ_REL_DIARIO:8, 
                    municipio:"BRASILEIA", 
                    idPlanoTrabalho:"AC1009101643", 
                    tempoTarde:0, 
                    valorConcedente:204100, 
                    dataCriacao:"$$DATE$$:2013-1-23", 
                    tempoManha:0, 
                    observacoes:"mkmkklllkml"
                }
            ], 
            invalidateCache:false, 
            isDSResponse:true, 
            operationType:"add", 
            queueStatus:0, 
            status:0
        }
    ]
    SQ_REL_DIARIO is the primary key of the master and is correctly returned.


    The DSRequest of the detail record containing the attachment is:
    Code:
    {
        dataSource:"anexoRelDiario", 
        operationType:"add", 
        componentId:"isc_DynamicForm_24", 
        data:{
            foto:"C:\\fakepath\\bg_login.jpg", 
            legenda:"Leganda", 
            tipoServico:2, 
            descricao:"kckljsklcjls"
        }, 
        callback:{
            target:[DynamicForm ID:isc_DynamicForm_24], 
            methodName:"saveEditorReply"
        }, 
        willHandleError:true, 
        showPrompt:false, 
        prompt:"Salvando formulário...", 
        oldValues:{
        }, 
        requestId:"anexoRelDiario$62710", 
        clientContext:{
        }, 
        useStrictJSON:true, 
        fallbackToEval:true, 
        form:[DynamicForm ID:isc_MultiFileItem_1_picker_uploadForm], 
        saveDataCallback:"isc_MultiFileItem_1.saveDataCallback()", 
        timeout:0, 
        afterFlowCallback:"isc_DynamicForm_24.$49z(dsRequest, dsResponse, data)", 
        directSubmit:true, 
        submitForm:[DynamicForm ID:isc_DynamicForm_24], 
        editor:[DynamicForm ID:isc_DynamicForm_24], 
        bypassCache:true
    }
    And the resulting DSResponse is:
    Code:
    [
        {
            data:[
                {
                    tipoServico:2, 
                    IM_FOTO_date_created:"2013-01-24T00:02:16", 
                    IM_FOTO_filesize:18946, 
                    IM_FOTO_filename:"bg_login.jpg", 
                    descricao:"kckljsklcjls", 
                    legenda:"Leganda", 
                    SQ_ANEXO_REL_DIARIO:3, 
                    _selection_4:true
                }
            ], 
            invalidateCache:false, 
            isDSResponse:true, 
            operationType:"add", 
            queueStatus:0, 
            status:0
        }
    ]
    Any clue?

    Thanks,
    Cédric.

    #2
    Hello,
    Were you able to reproduce this?
    Do you need more information?

    Thanks,
    Cédric.

    Comment


      #3
      This is currently assigned to a developer for investigation but we don't yet have any information for you. We'll let you know as soon as we do.

      Regards
      Isomorphic Software

      Comment


        #4
        The problem is with relation between data sources. Foreign key in details DS points to non existing field in master DS.

        master DS primaty key field:
        Code:
        <field name="SQ_REL_DIARIO" sequenceName="DB_FISCALIZACAO.SEQ_REL_DIARIO" type="sequence" hidden="true" primaryKey="true" />
        detail DS foreign key field:
        Code:
        <field name="relDiario" type="integer" nativeName="CD_REL_DIARIO" foreignKey="relDiario.id" hidden="true" />
        Fix:
        rename master DS primary key field to "id" (use nativeName for database column name)
        - OR -
        change detail DS foreign key field to have foreignKey="relDiario.SQ_REL_DIARIO"

        Comment


          #5
          Thanks for the reply and sorry for the naming mistake...

          I've choosed the fix number 2, and renamed the foreignKey.
          Code:
          <DataSource ID="anexoRelDiario" tableName="DB_FISCALIZACAO.TBL_ANEXO_REL_DIARIO" serverType="sql">
          	<fields>
          		<field type="sequence" name="SQ_ANEXO_REL_DIARIO" primaryKey="true" hidden="true"
          			sequenceName="DB_FISCALIZACAO.SEQ_ANEXO_REL_DIARIO" />
          		<!--  field name="legenda" title="Legenda" length="255" type="text" nativeName="TX_LEGENDA" /-->
          		<field name="foto" type="binary" nativeName="IM_FOTO" />
          		<field name="IM_FOTO_filesize" type="integer" nativeName="NU_TAMANHO_FOTO" hidden="true" />
          		<field name="IM_FOTO_date_created" type="datetime" nativeName="DT_UPLOAD_FOTO" hidden="true" />
          		<field name="IM_FOTO_filename" type="text" title="Nome do arquivo anexado" nativeName="TX_NOME_FOTO" hidden="true" />
          		<field name="relDiario" type="integer" nativeName="CD_REL_DIARIO" foreignKey="relDiario.SQ_REL_DIARIO" hidden="true" />
          	</fields>
          	<operationBindings>
          		<operationBinding operationType="fetch">
          			<whereClause><![CDATA[$defaultWhereClause AND CD_REL_DIARIO IS NOT NULL]]></whereClause>
          		</operationBinding>
          	</operationBindings>
          </DataSource>
          What I'm seeing now is that:
          1. after choosing a file in the picker, and clicking ok the grid stays empty. If I open the picker again, the previsously selected file is in still the list.
          2. add operation is not called for the detail.

          I've tried deleting the extra fields in the datasource: legenda, descricao and tipoDeServico but it didnt'change anything.

          In the ISC log I can see that the DSResponse is correctly formed, including the primary key:
          REQUEST:
          Code:
          {
              dataSource:"relDiario", 
              operationType:"add", 
              componentId:"isc_DynamicForm_20", 
              data:{
                  agenteFinanceiro:"FUNASA/PAC", 
                  numTcPac:"TC/PAC-1741/08", 
                  numProjeto:"PR1004088661", 
                  valorContrapartida:12498.75, 
                  situacaoObra:"EM EXECUÇÃO", 
                  sistema:"siscon", 
                  numAno:2008, 
                  dataVigencia:" a 26/02/2013", 
                  proponente:"PM CALIFORNIA", 
                  acao:"Água", 
                  municipio:"CALIFORNIA", 
                  numProcessoConvenio:"25100044672200895", 
                  valorConcedente:400001.25, 
                  numContrato:"142/2013", 
                  codProjeto:"PR1004088661", 
                  siglaEstado:"PR", 
                  empresaFiscalizadora:"RESTELO CONSTRUÇÕES E CONSULTORIA LTDA-EPP", 
                  tempoManha:0, 
                  tempoTarde:1, 
                  data:"2013-01-29T02:00:00"
              }, 
              callback:{
                  target:[DynamicForm ID:isc_DynamicForm_20], 
                  methodName:"saveEditorReply"
              }, 
              showPrompt:true, 
              prompt:"Salvando formulário...", 
              oldValues:{
              }, 
              requestId:"relDiario$6276", 
              clientContext:{
              }, 
              fallbackToEval:false, 
              afterFlowCallback:"isc_DynamicForm_20.$49z(dsRequest, dsResponse, data)", 
              editor:[DynamicForm ID:isc_DynamicForm_20], 
              bypassCache:true
          }
          RESPONSE:
          Code:
          [
              {
                  data:[
                      {
                          agenteFinanceiro:"FUNASA/PAC", 
                          numTcPac:"TC/PAC-1741/08", 
                          numProjeto:"PR1004088661", 
                          valorContrapartida:12498.75, 
                          data:new Date(1359424800000), 
                          situacaoObra:"EM EXECUÇÃO", 
                          sistema:"siscon", 
                          dataVigencia:" a 26/02/2013", 
                          proponente:"PM CALIFORNIA", 
                          acao:"Água", 
                          enviado:false, 
                          SQ_REL_DIARIO:30, 
                          municipio:"CALIFORNIA", 
                          numProcessoConvenio:"25100044672200895", 
                          tempoTarde:1, 
                          valorConcedente:400001.25, 
                          dataCriacao:new Date(1359554400000), 
                          codProjeto:"PR1004088661", 
                          tempoManha:0
                      }
                  ], 
                  invalidateCache:false, 
                  isDSResponse:true, 
                  operationType:"add", 
                  queueStatus:0, 
                  status:0
              }
          ]

          Comment


            #6
            Please can you try this use case again with a 4.0d nightly build from tomorrow (Feb 2nd) or later? As mentioned on your other thread, we have committed a number of changes in this area that may resolve this.

            Comment


              #7
              As I will try on the other issue (http://forums.smartclient.com/showthread.php?p=99125) I'll try on this one too.
              Thanks.

              Comment


                #8
                Hi,
                I've made some tests with the following version:
                Isomorphic SmartClient/SmartGWT Framework (SNAPSHOT_v9.0d_2013-02-03/EVAL Deployment 2013-02-03)

                I've used BuiltInDS as a base, added the two aforementioned datasources relDiario and anexoRelDiario, and configured server properties to use the existing database.
                I then edited the EntryPoint which now looks like:
                Code:
                public class BuiltInDS implements EntryPoint {
                
                    /**
                     * This is the entry point method.
                     */
                    public void onModuleLoad() {
                    	VLayout layout = new VLayout();
                    	final DynamicForm form = new DynamicForm();
                    	form.setDataSource(DataSource.get("relDiario"));
                    	form.setItems(new TextItem("servicosIniciados"), criaMultiFileItem("anexoRelDiario", "foto", "Fotos a anexar"));
                    	IButton iButton = new IButton("Salvar");
                    	iButton.addClickHandler(new ClickHandler() {
                			@Override
                			public void onClick(ClickEvent event) {
                				form.saveData();
                			}
                		});
                		layout.setMembers(form, iButton);
                    	layout.draw();
                    }
                    
                    public static MultiFileItem criaMultiFileItem(String datasource, String nome, String titulo) {
                		MultiFileItem multiFilePicker = new MultiFileItem(nome);
                		multiFilePicker.setAttribute("dataSource", datasource);
                		multiFilePicker.setTitle(titulo);
                		multiFilePicker.setTitleOrientation(TitleOrientation.TOP);
                		multiFilePicker.setWidth("100%");
                		multiFilePicker.setColSpan(3);
                		multiFilePicker.setEditButtonPrompt("Adicionar arquivos");
                		multiFilePicker.setRemoveButtonPrompt("Excluir arquivos");
                		multiFilePicker.setPickerAddAnotherFileButtonTitle("Adicionar outro");
                		multiFilePicker.setPickerCancelButtonTitle("Cancelar");
                		multiFilePicker.setPickerUploadButtonTitle("Salvar");
                		multiFilePicker.setWidth(400);
                		return multiFilePicker;
                	}
                
                }
                The good news is that I was able to save the form with the related attached files. The records in the detail table are now correctly linked to the master record. In the datasource definition I'm now able to use <fieldname>_XXXXX instead of <nativeName>_XXXXX to define the meta data fields. I was able to add and save file with spaces and accented characters too.

                But, there are some glitches:
                * In the OS select file box when you double click a file to select it the popup picker is closed. If you open it again, the file is still there, and the file is correctly saved.
                * After saving the form, if you add a new file in the picker, the file is saved to the database, but the grid is not updated
                * The picker lets you select more than one file in the OS select file, but only save to the database the last selected one. The <fieldname>_filename field is filled with the name of all selected files.
                * In update mode, if you select a previously saved file and click the remove button, the detail record is removed from the database but not frm the grid.

                Comment


                  #9
                  We'll take a look at these reports

                  Comment


                    #10
                    Items 2, 3 and 4 have been corrected in 4.0d and 3.1p and will show up in nightlies as of tomorrow. Item 1 requires a deeper investigation - we'll get back to you.

                    Comment


                      #11
                      We have now resolved item 1 as well. The fix was actually a change of behavior - the picker is now "modal" - in other words, a click outside the picker window won't auto-dismiss it. This is a more sensible UI - it forces the user to choose "Save" or "Cancel" rather than ever allowing an outside click to simply hide the picker.

                      The change applies to 3.1p and 4.0d branches.

                      Regards
                      Isomorphic Software

                      Comment


                        #12
                        Very good news, will test it tomorrow!

                        Comment


                          #13
                          I've tested with 3.1p-2013-02-08 and most of the problem were resolved.
                          After adding a file in the picker and closing it, the file appears in the grid.
                          But when I save the form with DynamicForm.saveData() the form data is correctly persisted, the DSResponse contains the id of the newly created record, but no add operation for the file is called.
                          In the console log the only thing I see is the add operation for the form data followed by a fetch operation for the related detail table.
                          Here is the datasource of the master:
                          Code:
                          <DataSource ID="relDiario" tableName="DB_FISCALIZACAO.TBL_REL_DIARIO" serverType="sql" inheritsFrom="relPlanoTrabalho">
                                <fields>
                                  <field name="SQ_REL_DIARIO" sequenceName="DB_FISCALIZACAO.SEQ_REL_DIARIO" type="sequence" hidden="true" primaryKey="true" /> 
                                  <field name="tempoManha" title="Tempo Manhã (Clima)" type="integer" nativeName="CD_TEMPO_MANHA">
                                  	<valueMap>
                          	            <value id="0">Bom</value>
                          	            <value id="1">Instável</value>
                          	            <value id="2">Chuvoso</value>
                          	            <value id="3">Impraticável</value>
                                      </valueMap>
                                  </field>
                                  <field name="tempoTarde" title="Tempo Tarde (Clima)" type="integer" nativeName="CD_TEMPO_TARDE">
                                      <valueMap>
                          	            <value id="0">Bom</value>
                          	            <value id="1">Instável</value>
                          	            <value id="2">Chuvoso</value>
                          	            <value id="3">Impraticável</value>
                                      </valueMap>
                                  </field>
                                  <field name="data" title="Data" type="data" nativeName="DT_REL_DIARIO"/>
                                  <field name="numTrabalhadores" length="9" title="Número de trabalhadores presentes na obra" type="integer" nativeName="NU_TRABALHADORES"/>
                                  <field name="observacoes" type="text" nativeName="TX_OBSERVACOES" length="4000"/>
                                  <field name="servicosIniciados" type="text" title="Serviços iniciados" nativeName="TX_SERVICOS_INICIADOS" length="4000"/>
                                  <field name="servicosDesenvolvidos" type="text" title="Serviços desenvolvidos no período" nativeName="TX_SERVICOS_DESENVOLVIDOS" length="4000"/>
                                  <field name="servicosConcluidos" type="text" title="Serviços concluídos no período" nativeName="TX_SERVICOS_CONCLUIDOS" length="4000"/>
                                  <field type="boolean" name="enviado" nativeName="LO_ENVIADO" title="Relatório Enviado" sqlStorageStrategy="singleChar" sqlFalseValue="N" sqlTrueValue="S" hidden="true"/>
                          		<field name="dataEnvio" type="datetime" nativeName="DT_ENVIO" hidden="true"/>
                          		<field name="dataCriacao" type="creatorTimestamp" nativeName="DT_CRIACAO" />        
                                </fields>
                                <operationBindings>
                          		<operationBinding operationType="fetch" operationId="porCdPlano">
                          			<whereClause><![CDATA[CD_PLANO = $criteria.idPlanoTrabalho]]></whereClause>
                          		</operationBinding>
                          		<operationBinding operationType="custom" operationId="geraPDF">
                          			<serverObject bean="servicoRelatorios" methodName="geraPDFRelatorioDiario" lookupStyle="spring" />
                          		</operationBinding>
                          		<operationBinding operationType="add" operationId="enviar">
                          			<serverObject bean="servicoRelatorios" methodName="enviarRelatorio" lookupStyle="spring" />
                          		</operationBinding>
                          		<operationBinding operationType="update" operationId="enviar">
                          			<serverObject bean="servicoRelatorios" methodName="enviarRelatorio" lookupStyle="spring" />
                          		</operationBinding>
                          	</operationBindings>
                          </DataSource>
                          Here's the detail datasource:
                          Code:
                          <DataSource ID="anexoRelDiarioSrvcIniciado" tableName="DB_FISCALIZACAO.TBL_ANEXO_REL_DIARIO" serverType="sql">
                          <fields>
                          	<field type="sequence" name="SQ_ANEXO_REL_DIARIO" primaryKey="true" hidden="true" sequenceName="DB_FISCALIZACAO.SEQ_ANEXO_REL_DIARIO" />
                          	<field name="relDiario" type="integer" nativeName="CD_REL_DIARIO_SRVC_INICIADO" foreignKey="relDiario.SQ_REL_DIARIO"
                          		hidden="true" />
                          	<field name="legenda" title="Legenda" length="255" type="text" nativeName="TX_LEGENDA" />
                          	<field name="fotoSrvcIniciado" type="binary" title="Foto" nativeName="IM_FOTO" />
                          	<field name="fotoSrvcIniciado_filesize" type="integer" nativeName="NU_TAMANHO_FOTO" hidden="true" />
                          	<field name="fotoSrvcIniciado_date_created" type="datetime" nativeName="DT_UPLOAD_FOTO" hidden="true" />
                          	<field name="fotoSrvcIniciado_filename" type="text" title="Nome do arquivo anexado" nativeName="TX_NOME_FOTO" hidden="true" />
                          </fields>
                          </DataSource>
                          The first add operation request and response is:
                          Code:
                          Request:
                          {
                              dataSource:"relDiario", 
                              operationType:"add", 
                              componentId:"isc_DynamicForm_4", 
                              data:{
                                  agenteFinanceiro:"FUNASA/PAC", 
                                  numTcPac:"TC/PAC-536//09", 
                                  numProjeto:"MT1610093731", 
                                  valorContrapartida:0, 
                                  situacaoObra:"NÃO INICIADA", 
                                  sistema:"siscon", 
                                  acao:"Água", 
                                  proponente:"PM /CAMPO VERDE", 
                                  dataVigencia:"31/12/2009 a 29/03/2013", 
                                  numAno:2009, 
                                  municipio:"CAMPO VERDE", 
                                  numProcessoConvenio:"25100060332200992", 
                                  percentagemObra:",6%", 
                                  valorConcedente:0, 
                                  numContrato:"123/2013", 
                                  codProjeto:"MT1610093731", 
                                  siglaEstado:"MT", 
                                  empresaFiscalizadora:"CONSEGV - PLANEJAMENTO E OBRAS LTDA", 
                                  tempoManha:0, 
                                  tempoTarde:1
                              }, 
                              callback:{
                                  target:[DynamicForm ID:isc_DynamicForm_4], 
                                  methodName:"saveEditorReply"
                              }, 
                              showPrompt:true, 
                              prompt:"Salvando formulário...", 
                              oldValues:{
                              }, 
                              requestId:"relDiario$6273", 
                              clientContext:{
                              }, 
                              fallbackToEval:false, 
                              afterFlowCallback:"isc_DynamicForm_4.$49z(dsRequest, dsResponse, data)", 
                              editor:[DynamicForm ID:isc_DynamicForm_4], 
                              bypassCache:true
                          }
                          Response:
                          [
                              {
                                  data:[
                                      {
                                          agenteFinanceiro:"FUNASA/PAC", 
                                          numTcPac:"TC/PAC-536//09", 
                                          numProjeto:"MT1610093731", 
                                          valorContrapartida:0, 
                                          situacaoObra:"NÃO INICIADA", 
                                          sistema:"siscon", 
                                          dataVigencia:"31/12/2009 a 29/03/2013", 
                                          proponente:"PM /CAMPO VERDE", 
                                          acao:"Água", 
                                          enviado:false, 
                                          SQ_REL_DIARIO:41, 
                                          municipio:"CAMPO VERDE", 
                                          numProcessoConvenio:"25100060332200992", 
                                          percentagemObra:",6%", 
                                          tempoTarde:1, 
                                          valorConcedente:0, 
                                          dataCriacao:new Date(1361199600000), 
                                          codProjeto:"MT1610093731", 
                                          tempoManha:0
                                      }
                                  ], 
                                  invalidateCache:false, 
                                  isDSResponse:true, 
                                  operationType:"add", 
                                  queueStatus:0, 
                                  status:0
                              }
                          ]
                          And the follwing fetch request and response are:
                          Code:
                          Request:
                          {
                              dataSource:"anexoRelDiarioSrvcIniciado", 
                              operationType:"fetch", 
                              componentId:"isc_MultiFileItem_1_canvas", 
                              data:{
                                  relDiario:41
                              }, 
                              startRow:0, 
                              endRow:75, 
                              textMatchStyle:"exact", 
                              resultSet:[ResultSet ID:isc_ResultSet_1 (created by: isc_MultiFileItem_1_canvas)], 
                              callback:{
                                  caller:[ResultSet ID:isc_ResultSet_1 (created by: isc_MultiFileItem_1_canvas)], 
                                  methodName:"fetchRemoteDataReply"
                              }, 
                              willHandleError:true, 
                              showPrompt:true, 
                              prompt:"Pesquisando registros...", 
                              oldValues:{
                                  relDiario:41
                              }, 
                              requestId:"anexoRelDiarioSrvcIniciado$6274", 
                              clientContext:{
                                  requestIndex:{
                                      Class:"Number", 
                                      formatter:"toString", 
                                      localeStringFormatter:"toString", 
                                      localeProperties:Obj
                                  }
                              }, 
                              fallbackToEval:false, 
                              bypassCache:true
                          }
                          
                          Response:
                          [
                              {
                                  data:[
                                  ], 
                                  endRow:0, 
                                  invalidateCache:false, 
                                  isDSResponse:true, 
                                  operationType:"fetch", 
                                  queueStatus:0, 
                                  startRow:0, 
                                  status:0, 
                                  totalRows:0
                              }
                          ]
                          Something I've noticed is that when I click on the save button, the selected files in the grid are vanishing. I have encountered a second bug: when validation fails on the form the grid is cleaned too and the select items disappear too.
                          One more thing I've encountered is that when you two MultiFileItem on the same form, each one with a distinct detail datasource when you save the form I see the add operation followed by 3 fetch operations. Looking in Firebug's console, I can see 3 requests. Shouldn't there be only 1 request with transaction chaining??

                          Comment


                            #14
                            One more bug I've just found, if I set disabled to true on a MultiFileItem the add and remove buttons are still available.

                            Comment


                              #15
                              As a workaround I was hiding (setVisible(false)) the MultiFileItem but after save is complete I'm seeing in the isc console log:

                              Code:
                              [ERROR] [br.gov.funasa.fiscalizacao.Fiscalizacao] - 08:54:14.632:XRP9:WARN:Log:TypeError: this.picker is undefined
                              Stack from error.stack:
                                  unnamed(isc_MultiFileItem_saveDataCallbac) @ br.gov.funasa.fiscalizacao.Fiscalizacao/sc/modules/ISC_Forms.js:1793
                                  unnamed(isc_MultiFileItem_formSave) @ br.gov.funasa.fiscalizacao.Fiscalizacao/sc/modules/ISC_Forms.js:1793
                                  unnamed(.formSavedComplet) @ br.gov.funasa.fiscalizacao.Fiscalizacao/sc/modules/ISC_DataBinding.js:1499
                                  unnamed(isc_MultiFileItem_saveDataCallbac) @ br.gov.funasa.fiscalizacao.Fiscalizacao/sc/modules/ISC_Forms.js:1793
                                  unnamed(isc_MultiFileItem_formSave) @ br.gov.funasa.fiscalizacao.Fiscalizacao/sc/modules/ISC_Forms.js:1793
                                  unnamed(.formSavedComplet) @ br.gov.funasa.fiscalizacao.Fiscalizacao/sc/modules/ISC_DataBinding.js:1499
                                  unnamed(.$49) @ br.gov.funasa.fiscalizacao.Fiscalizacao/sc/modules/ISC_DataBinding.js:1499
                                  unnamed(anonymou) @ br.gov.funasa.fiscalizacao.Fiscalizacao/sc/modules/ISC_Core.js:63
                                  unnamed(isc_c_Class_fireCallbac) @ br.gov.funasa.fiscalizacao.Fiscalizacao/sc/modules/ISC_Core.js:256
                                  unnamed(isc_Class_fireCallbac) @ br.gov.funasa.fiscalizacao.Fiscalizacao/sc/modules/ISC_Core.js:311
                                  unnamed(isc_DataSource_fireResponseCallback) @ br.gov.funasa.fiscalizacao.Fiscalizacao/sc/modules/ISC_DataBinding.js:639
                                  unnamed(isc_DataSource__completeResponseProcessin) @ br.gov.funasa.fiscalizacao.Fiscalizacao/sc/modules/ISC_DataBinding.js:637
                                  unnamed(isc_DataSource__handleSCServerRepl) @ br.gov.funasa.fiscalizacao.Fiscalizacao/sc/modules/ISC_DataBinding.js:1663
                                  unnamed(isc_c_Class_fireCallbac) @ br.gov.funasa.fiscalizacao.Fiscalizacao/sc/modules/ISC_Core.js:256
                                  unnamed(isc_Class_fireCallbac) @ br.gov.funasa.fiscalizacao.Fiscalizacao/sc/modules/ISC_Core.js:311
                                  unnamed(isc_c_RPCManager_fireReplyCallbac) @ br.gov.funasa.fiscalizacao.Fiscalizacao/sc/modules/ISC_DataBinding.js:1217
                                  unnamed($wnd.isc.RPCManager.fireReplyCallbac) @ :238
                                  unnamed(isc_c_RPCManager_fireReplyCallback) @ br.gov.funasa.fiscalizacao.Fiscalizacao/sc/modules/ISC_DataBinding.js:1220
                                  unnamed(isc_c_RPCManager_performOperationRepl) @ br.gov.funasa.fiscalizacao.Fiscalizacao/sc/modules/ISC_DataBinding.js:1217
                                  unnamed(isc_c_RPCManager__performTransactionRepl) @ br.gov.funasa.fiscalizacao.Fiscalizacao/sc/modules/ISC_DataBinding.js:1211
                                  unnamed(isc_c_RPCManager_performTransactionRepl) @ br.gov.funasa.fiscalizacao.Fiscalizacao/sc/modules/ISC_DataBinding.js:1177
                                  unnamed(anonymou) @ br.gov.funasa.fiscalizacao.Fiscalizacao/sc/modules/ISC_Core.js:63
                                  unnamed(isc_c_Class_fireCallbac) @ br.gov.funasa.fiscalizacao.Fiscalizacao/sc/modules/ISC_Core.js:256
                                  unnamed(isc_c_Comm_performXmlTransactionRepl) @ br.gov.funasa.fiscalizacao.Fiscalizacao/sc/modules/ISC_Core.js:919
                                  unnamed(anonymou) @ br.gov.funasa.fiscalizacao.Fiscalizacao/sc/modules/ISC_Core.js:63
                                  unnamed(isc_c_Class_fireCallbac) @ br.gov.funasa.fiscalizacao.Fiscalizacao/sc/modules/ISC_Core.js:256
                                  unnamed(isc_c_Comm__fireXMLCallbac) @ br.gov.funasa.fiscalizacao.Fiscalizacao/sc/modules/ISC_Core.js:901
                                  unnamed(isc_c_Comm_sendXmlHttpRequest/_1) @ br.gov.funasa.fiscalizacao.Fiscalizacao/sc/modules/ISC_Core.js:906
                                  unnamed() @
                              Any clue? I'm still not able to use this component.
                              Last edited by basis.cedric; 19 Feb 2013, 05:13. Reason: Typo

                              Comment

                              Working...
                              X