Hello all,
I'm currently investigating how to manage the back button while processing a
sequence of steps that might jump from one context to another. (I know this
might lead to very complicated cases and we should do our best to perform a
set of atomic transactions but sometimes we have a complicated set of
objects that have a 1..n cardinality)
For example, assumes I navigate in some sort of wizard in a Module 1, there
are 4 steps to complete the process and each step might give you the
possibility to jump to another module to define a related property that can
be defined in the screen (here in screen 2 in module 1, I have the
possibility to go to another module 2 itself splitted in 1 or more steps
which once finished will return you to your source screen (screen 2 module
1).
M1.1 -> M1.2 -> M1.3 -> M1.4
| ^
V |
| +------------+
+--M2.1 --> ... +
Assuming that you have data related to a given state in your transaction
(for example you could fill a bean with info in several pages, but once you
go back 2 pages before and resubmit data, obviouslly you will want to remove
the data that were setted in the 2 next pages before.
We thought about keeping an history (limited of course) of these
intermediate data (stored in session) for each screen. (the datas in
sessions (bean + others) are cloned at each screen and stored in the history
session). If we add the _session_counter to the url (deriving TemplateLink
to do it automatically), we will have an easy way to do the same sort of
detection that is performed in the session validator. (ie detecting if the
user clicked on the back button)
When the back is detected, the datas in the related session in the history
will then replace the data in the current session...
Does the idea sounds good to people here or is someone seeing a better way
to perform this ?
--
St�phane Bailliez
Software Engineer, Paris - France
iMediation - http://www.imediation.com
Disclaimer: All the opinions expressed above are mine and not those from my
company.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]