In his article, Scott based his solution on overriding two
main methods to be able to store the view state into a persistent medium.
·
SavePageStateToPersistentMedium()
·
LoadPageStateFromPersistenceMedium()
The former is used to serialize the view state of the page
to a hidden form field during the save view state stage. The later is used to
de-sterilize the view state from the hidden form field during the load view
state stage.
Therefore, the above two methods were overridden in a sense
to serialize the view state, not to store it in a hidden form field, but
instead store it in the system’s file system. In the load view state stage,
instead of reading the view state from the hidden field, view state was read
from the same text file that it was written to. Then it is de-serialized.
Scott used a simple technique to name the view state file
that was used to store the view state. He based his solution on the Session ID
and the page’s name. This way, in the same session there will be only one file
used to store/load the view state of a specific page.