Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
New interesting demo available
#11
I've refactored one of my apps to take advantage of the new back button functionality.  With PostRedirectGet = prgEnabled it seems to mostly work but for two issues:


  1. RegisterCallBack functions fail if invoked after a back button, forward button sequence.  They will only work again after a full refresh.
  2. Back / forward history gets lost after a bootstrap modal dialog popup (pure bootstrap, no IW bootstrap components).  Not worried about this one so much.
I'll provide a demo for issue 1 after some more research.  I have a strong interest in seeing this new functionality work 100% as IW back button behavior always requires an explanation to the customer.  If this gets implemented 100% it would be the 3rd best all-time enhancement of IW in my opinion.
Reply
#12
(06-20-2022, 03:44 PM)MJS@mjs.us Wrote: I've refactored one of my apps to take advantage of the new back button functionality.  With PostRedirectGet = prgEnabled it seems to mostly work but for two issues:


  1. RegisterCallBack functions fail if invoked after a back button, forward button sequence.  They will only work again after a full refresh.
  2. Back / forward history gets lost after a bootstrap modal dialog popup (pure bootstrap, no IW bootstrap components).  Not worried about this one so much.
I'll provide a demo for issue 1 after some more research.  I have a strong interest in seeing this new functionality work 100% as IW back button behavior always requires an explanation to the customer.  If this gets implemented 100% it would be the 3rd best all-time enhancement of IW in my opinion.

* Start the application. F9 to start a browser session
* MainForm is shown. Press button [Go to SecondForm]
* SecondForm is shown with correct url. Now press the browser back button.
* MainForm is shown. Press 'Callback' button
* The IWEdit1 text is not updated.
* Press F5 for full refresh, 'Callback' button works and IWEdit1 text is updated.


Attached Files
.zip   MultiPageApp.zip (Size: 93.16 KB / Downloads: 0)
Reply
#13
I found out what is wrong. Unfortunately Chrome and Firefox behave differently when it comes to certain events.

It has been fixed and enhanced. Both sync and async events can be used to switch forms/addresses and sync is done transparently under the hood. I'm finishing the tests and I'm going to release it soon.

To be honest, I thought this would be a lost battle, giving the difference in behavior of the browsers and the complexity of the whole thing, but it works really well with absolutely zero user code.

BTW it will work with or without PRG, although I personally am a fan of this pattern :-)

Cheers,
Reply
#14
Please update to IW 15.2.58.

I also recommend you to update the Multi-page demo from the github repo.

I expect it to run perfectly now
Reply
#15
With IW 15.2.60 I am now seeing an 'Invalid page context' popup error when:

1. CheckFormId = true;
2. OnAsyncClick invokes WebApplication->GoToURL

No error when OnClick invokes WebApplication->GoToURL regardless of CheckFormId state.
Reply
#16
yes, I can confirm that CheckFormId is not compatible with changing forms in Async, ATM.

I'll check that and get back to you
Reply
#17
Back to the back button - I observed this while testing Datatables with large datasets where a data pull took 0.5 to 1 seconds.  This is noticeable enough where I can't use the new back button functionality quite yet.

1.  Access IWForm+DataTables [populated by Content Handler] by GoToURL, datatables refreshes once correctly.
2.  Back button to an IWForm then forward button to IWForm+DataTables, datatables refreshes twice incorrectly.
3.  Add an address to the url bar of a static page or non IW app and navigate to it.
4.  Back button to IWForm+DataTables, datatables refreshes once correctly.

Navigating to IWForm+DataTables by GoToURL always works correctly.
Navigating to IWForm+DataTables from a static or non IW site by back/forward buttons always works correctly.
Navigating to IWForm+DataTables from an IWForm by back/forward buttons causes double calls to content handler.
Extra test:  DataTables in a static page served by an IW app Content Handler always works correctly with back/forward buttons.

[Image: clip0002.gif]
Reply
#18
The CheckFormID compatibility issue has been fixed in latest IW 15.2.61 release.

I'll evaluate your last post and get back to you on this.
Reply
#19
in DevTools if 'Disable Cache' is enabled datatables refreshes correctly.
Reply
#20
>> 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?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)