Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
5
Erster Beitrag:
vor 6 Monaten, 3 Wochen
Letzter Beitrag:
vor 6 Monaten, 3 Wochen
Beteiligte Autoren:
SolutionJ-Reg, Danny Lauwers, Fabrice Harari

Ajax Table not refreshing - WB20

Startbeitrag von SolutionJ-Reg am 25.01.2017 16:04

Hi,

I've read a couple of threads about this sort of thing and have followed (I think) the advice given, however my Ajax table is still not refreshing.

The table's source is a global array / structure defined in the project initialisation code. I have a local procedure (server) in the page that runs a query and loads the global array.

If the user clicks a Save button (which sends fields to the server) then once I've added a record to the file from which the table's data is taken I execute the same local procedure. I can see that the global array is loaded with the new record but the table is not refreshed.

Clearly I'm doing something wrong but I just can't see what?

Antworten:

Hi

We can't either... Our excuse? We can't see the code...

What's yours? :-)

von Fabrice Harari - am 25.01.2017 18:04
ok,

This is code of the save/submit button (server):

sMsg is string

LooperDeleteAll(LOOP_Errors)

//validation here
IF COMBO_Broker < 1 THEN LooperAddLine(LOOP_Errors,"Broker is missing")
IF COMBO_BrokerContact < 1 THEN LooperAddLine(LOOP_Errors,"Broker Contact is missing")
IF COMBO_Funder < 1 THEN LooperAddLine(LOOP_Errors,"Funder is missing")
IF Length(EDT_EndUserDetails) < 1 THEN LooperAddLine(LOOP_Errors,"End User Details are missing")
IF COMBO_Dealer < 1 THEN LooperAddLine(LOOP_Errors,"Dealer is missing")
IF Length(EDT_VDescription) < 1 THEN LooperAddLine(LOOP_Errors,"Vehicle Details are missing")
IF Length(EDT_ExtColour) < 1 THEN LooperAddLine(LOOP_Errors,"External Colour is missing")
IF Length(EDT_IntColour) < 1 THEN LooperAddLine(LOOP_Errors,"Internal Colour is missing")
IF EDT_BasicPrice = 0 THEN LooperAddLine(LOOP_Errors,"Basic Price is missing")

IF LooperCount(LOOP_Errors,toTotal) > 0 THEN RETURN

PageToFile(PAGE_Form_VehicleQuotation,VEHICLEQUOTATION)
IF VEHICLEQUOTATION..NewRecord THEN
HAdd(VEHICLEQUOTATION)
sMsg = "Quotation Added"
ELSE
HModify(VEHICLEQUOTATION)
sMsg = "Quotation Updated"
END
IF HErrorDuplicates() THEN
Error("Duplicate error on unique key")
RETURN
END
IF HErrorIntegrity() THEN
Error(HErrorInfo())
RETURN
END

IF clsDiary.Add_Entry(0,Val(VEHICLEQUOTATION.VehicleQuotationID),sMsg,True,False,"") rcok THEN
Info("WARNING - Diary Entry was not successful. Please alert Support")
RETURN
ELSE
LP_RefreshDiary()
END


And follows procedure LP_RefreshDiary (server)

PROCEDURE LP_RefreshDiary()
TableDeleteAll(TABLE_Diary)
ArrayDeleteAll(garrSTDiaryEntries)

IF VEHICLEQUOTATION.VehicleQuotationID = 0 THEN RETURN

QRY_DiaryEntries.PQuotationID = VEHICLEQUOTATION.VehicleQuotationID
IF NOT HExecuteQuery(QRY_DiaryEntries) THEN
Error("Diary look up failed. Please contact Support")
RETURN
END
FileToArray(garrSTDiaryEntries,QRY_DiaryEntries)
HFreeQuery(QRY_DiaryEntries)

von SolutionJ-Reg - am 25.01.2017 18:16
Hi,

Is there not a TableDisplay missing ?

Danny

von Danny Lauwers - am 26.01.2017 01:23
Hi Danny,

That's it! Many thanks :)

von SolutionJ-Reg - am 26.01.2017 06:10
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.