Reactive Previous Screen Navigation
Question

I'm trying to understand how the view state functions with navigation in a reactive web app.

I've got Screen A, which is a master-detail screen.

I've got Screen B, which is detail editor screen.

And I've got Screen C, which is a sub-detail editor screen.

Linearly, the user navigates from A to B to C.

If from screens B and C, if I use the "Previous Screen" as a button/link navigation target, it seems as though all of the local variables are retained when the previous screen loads.  The local variables retain the value they had when I went to the next screen.

However, if I do a page refresh on screens B or C, any prior screens lose their view state and navigating back through the Previous Screen acts as though the page is being loaded for the first time.

I've search through the forums and docs, but I can't find anything that exactly spells out how the view state is maintained.  I'm wondering if the "Previous Screen" navigation is just like hitting the back button in the browser, and the browser pulls back up whatever it has cached.  Is that correct?

Hi Jim,

I'm not sure what you mean with viewstate, as that is a technology used with aspx pages (Traditional Web), and it's not used any more in Reactive Web.

I tested what you said and that's indeed how it happens. So I assume what you explained in your last paragraph is indeed what's happening.

To prevent that behavior, you can set the local variables to their empty states in the OnInitialize of the previous screen (if that do not interfere with your business requirements, of course), or redirect the user to the screen itself instead of redirecting to the "Previous screen" (by using ExternalSite if needed).

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.