Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
New interesting demo available
#21
(07-10-2022, 12:47 AM)Alexandre Machado Wrote: >> Navigating to IWForm+DataTables from an IWForm by back/forward buttons causes double calls to content handler.

If I understood correctly this issue only happens when using Edge?

Correct.  I've only tested with Edge and Chrome, issue shows in Edge.  If you want to observe / test / capture info from DevTools I can give you a login to the system where the I took the screen shot.
Reply
#22
(07-10-2022, 12:51 PM)MJS@mjs.us Wrote:
(07-10-2022, 12:47 AM)Alexandre Machado Wrote: >> Navigating to IWForm+DataTables from an IWForm by back/forward buttons causes double calls to content handler.

If I understood correctly this issue only happens when using Edge?

Correct.  I've only tested with Edge and Chrome, issue shows in Edge.  If you want to observe / test / capture info from DevTools I can give you a login to the system where the I took the screen shot.

If I can se the real thing happening on your application it would be great. Please feel free to send me any details via email (alexandre at atozed dot com).

Cheers
Reply
#23
(07-10-2022, 09:13 PM)Alexandre Machado Wrote:
(07-10-2022, 12:51 PM)MJS@mjs.us Wrote:
(07-10-2022, 12:47 AM)Alexandre Machado Wrote: >> Navigating to IWForm+DataTables from an IWForm by back/forward buttons causes double calls to content handler.

If I understood correctly this issue only happens when using Edge?

Correct.  I've only tested with Edge and Chrome, issue shows in Edge.  If you want to observe / test / capture info from DevTools I can give you a login to the system where the I took the screen shot.

If I can se the real thing happening on your application it would be great. Please feel free to send me any details via email (alexandre at atozed dot com).

Cheers

Sent.
Reply
#24
Thanks.

I got a chance to debug your case today... that's interesting.

The thing is that you reload your data grid from the jquery onReady event which happens before the event that reloads the page when necessary. jQuery's onReady event triggers even when the page is loaded from cache but there is no way to differentiate when it's being loaded from cache.
Right now I can think of a couple of ways to deal with that but I'd rather think and play a little more with it before proposing a solution.

I'll keep you posted.

Cheers,
Reply
#25
>>I'll keep you posted.

Got it, thanks.

I am able to reproduce in Chrome now, maybe I accidently had 'Disable Cache' set when I first tested.  This is actually better because now it's consistent.  One thing to note is that the double call only happens when navigating to a datatable from an IWForm by a back or forward button.  If you go a datatable from anything non-IWForm it refreshes correctly.  This makes me think there is something in the IWForm logic that's affecting the refresh.
Reply
#26
It's this little bugger that doesn't like datatables (I have a work around so a fix isn't critical for me now):



[Image: clip0014.png]
Reply
#27
Is it possible to add the IW .js files to the source zip file when there's a new release?  This would make it easier to use a diff tool between versions if there are issues.
Reply
#28
Yes, this is the code that reloads the page if out of sync with IW server and, as I mentioned earlier, it reloads the page after the jQuery onReady event runs.

I refactored this area so there is a new JavaScript function which returns true if the page is being reloaded from the cache (i.e. TrackID of the page is less than the value on the server).

In this case you could check the value returned by this function inside the onReady() event handler and skip the reloading of the grid if reloading from cache (because it will be reloaded anyway by IW own code)

Regarding your request to add the .js files, I'll see if they can be added to the zip file containing source code. Not sure if it will be ready for the next release though...
Reply
#29
>>In this case you could check the value returned by this function inside 
>>the onReady() event handler and skip the reloading..

As a work around I disable the reloadCheck function for the forms containing datatables, it fixed the double refresh and didn't seem to have any other ill effects.  The datatables issue is the last thing I could find with the new back button logic, everything seems to be working perfectly now.  Many thanks for implementing this - I consider this a great improvement to the product.

>>I'll see if they can be added to the zip file containing source code...

Cool, thanks again.


Regards,
Mark
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)