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:
relDiario is the foreign key.
Master datasource is:
Here are the logs from the RPC tab of ISC Console:
DSRequest adding master record:
DSResponse after adding master record:
SQ_REL_DIARIO is the primary key of the master and is correctly returned.
The DSRequest of the detail record containing the attachment is:
And the resulting DSResponse is:
Any clue?
Thanks,
Cédric.
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>
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>
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 }
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 } ]
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 }
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 } ]
Thanks,
Cédric.
Comment