I need to refill my grid each time the user sets a new date (data from a WebService). According to event triggering order, I was thinking of:
(1) Action Event: call a procedure to get the data, transform it, fill the SDT and put it on a WebSession var.
(2) Refresh Event: re-build the local SDT with the new values.
(3) Load Event: Load the grid.
However, when I build this, I can see a warning saying:
spc0185: Websession's contents will not be preserved between calls to Refresh event.
And I can confirm that the behaviour is a bit odd (the grid is only refreshed the fist time user changes the date).
Event &myDate.ControlValueChanged
composite
setGridJson(&mydate)
Refresh
endcomposite
Endevent
Event Refresh
&mydate = ctod(&websession.get('newDate')) //to refresh the date var
&myJSON = &websession.get('GridJSON')
&mySDT.FromJson(&myJSON)
Endevent
Event Load
for &mySDTItem in &mySDT
&field1 = &mySDTItem.field1
&field2 = &mySDTItem.field2
&field3 = &mySDTItem.field3
LOAD
endfor
Endevent
Is there any workaround for this? How can I refill the grid each time the &myDate var changes?
Thanks