GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEV
,
WEBDEV
e
WINDEV Mobile
Inicio
|
Mensagens recentes
|
Conecte-se...
|
Disconnect
|
Português
Inicio
→
WEBDEV 2024
→
Performing a check exiting from a cell, values not current but previous
Performing a check exiting from a cell, values not current but previous
Iniciado por busfra, dez., 18 2018 12:28 PM - Sem resposta
Conecte-se…
busfra
#1
Membro registado
19 mensagems
Publicado em dezembro, 18 2018 - 12:28 PM
Good morning
in Webdev 23 last update 53k, after some bad tests, I think there is a bug (but I hope I'm wrong..)
I try to explain
I have a page with an Ajax table control based on a db table
I'm trying to make some check on the values exiting from a single cell of this table control
I see that I can do that ONLY by calling an Ajax procedure on the code, browser side.
Then, in my "Exit with modification" (OnChange) code or "Control Exit"(on blur) I put an AjaxExecute to my procedure.
In order that I can't refer directly to a table column in Browser code, I want pass to my procedure a string containing the name of that control (table.column).
In my Procedure then I read by indirection the value of the cell.
The problem (I think a bug) is that the call returns always the value BEFORE the modification, the previous value
In fact I try this:
- I write "Test" in the cell
- the event fires
- my procedure receives the name of the column and the indirection get an empty field
- I return to the cell
- I update the value in "After test"
- the event fires and the procedure returns "Test" (the "before" value)
Am I wrong?
Is there another way to perform a check on the table cell value?
Another question please: in the same table I set the input size of a text column, but, at runtime, the input is not stopped to the requested size (in a form all is right): why?
Follows code of tha Ajax call and my Ajax procedure
// ONCHANGE (browser)
IF AJAXAvailable() = True THEN
Res is string
Res = AJAXExecute(ajaxUpdateControls,CheckObjectSize,"PAGE_Form_Tranfer_Goods.TABLE_Smt_p_transfergoodsdetails.COL_MaterialCode")
END
=======================
//Global procedure
PROCEDURE CheckObjectSize(sControl is string)
cmd_testedValue is string = {sControl+"..Value"}
cmd_linkfile is string= {sControl+"..FileLink"}
aa is string = smt_p_transfergoodsdetails.MaterialCode..Size
cmd_sizeOnDB is int = {cmd_linkfile}..Size
ToastDisplay(cmd_testedValue)
IF Length(cmd_testedValue) > cmd_sizeOnDB THEN
RESULT False
END
RESULT True
Thanks
Franco
Denunciar
0
0
→ Voltar para WEBDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (versões anteriores)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Tipo de Pesquisa
Apenas tópicos
Todas as mensagens
Período de pesquisa
Qualquer momento
Última hora
Últimas 24 horas
Semana passada
Mês passado
Ano passado
Cancelar
Pré-visualização da sua mensagem
Adicionar imagem
Importar uma imagem de uma URL
Enviar uma imagem a partir do seu disco
Deixe um ficheiro ou clique em "Procurar ..."
ou
Cancelar
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Texto