I am using an ajaxCallback to get info from a SQL table which is used in the HTML expression of a List Group Header
this works fine in Working Preview, but when I use Live Preview the ajax doesn't return the info until after the List is drawn so the info does not show up in the Group Header
I usually put this type of callback in the UX InitializeComplete event, I tried moving it to the List OnBeforePopulate event, still does not return till after the list is drawn
I have included a test UX, highly simplified from what I am building (uses static data and no SQL call) just returns a text string
The trace strings at the top of the list show the order things are happening:
The callback getHdr returns the javascript function get_hdr which sets the vHdr variable
in working preview the this occurs after the UX InitializationComplete event
in Live Preview it does not occur until after the second onBeforeListDraw event
in both cases the list calls the getHdrHtml function to sets it's HTML after the on BeforePopulate and UX InitializationComplete events
for some reason I have never understood, the header cycles thru this process twice, seems like a lot of processes in the list do that
it's the second call that should load the info into the header HTML, but this only works in working preview
this works fine in Working Preview, but when I use Live Preview the ajax doesn't return the info until after the List is drawn so the info does not show up in the Group Header
I usually put this type of callback in the UX InitializeComplete event, I tried moving it to the List OnBeforePopulate event, still does not return till after the list is drawn
I have included a test UX, highly simplified from what I am building (uses static data and no SQL call) just returns a text string
The trace strings at the top of the list show the order things are happening:
The callback getHdr returns the javascript function get_hdr which sets the vHdr variable
in working preview the this occurs after the UX InitializationComplete event
in Live Preview it does not occur until after the second onBeforeListDraw event
in both cases the list calls the getHdrHtml function to sets it's HTML after the on BeforePopulate and UX InitializationComplete events
for some reason I have never understood, the header cycles thru this process twice, seems like a lot of processes in the list do that
it's the second call that should load the info into the header HTML, but this only works in working preview
Comment