cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig Gulliver" <cgulli...@alarmpoint.com>
Subject Back button issues with multipage forms
Date Wed, 15 Mar 2006 16:45:08 GMT
I have several forms that use the multipage wizard.  The basic idea is
that the form has multiple group widget containers that can be hidden or
displayed based on user actions(ie button clicks really).  And are
controlled using button event handers (on-action events) in the form
definition.

 

My problem is stemming from the use of the back button with these types
of pages.

 

The first thing I investigated was how continuations would solve my
problem.  It seemed like the right candidate to provide a solution.  I
turns out that even with continuations these forms still do not behave
as I expect.  I tracked the issue down to the fact that the form and
it's state are not recorded at each continuation.  The result is that
the form widget states do not revert.  In other words, the continuation
does not have this state when applied to the process.

 

To illustrate:

 

* Displaying form with group A and group B.  Group A is active, and
Group B is invisible.

 

* User submits the form using the flip button, the buttons event handler
flips the state of each Group so that A is invisible and B is active.

 

* User hits the browser back button, then hits the flip button again.
The form processing shows that the state is that in step 2 instead of
step 1.  The state of these widget containers affect how the request is
processed, and explains the strange behaviour.

 

Another item I came across was the use of page local.  The cocoon object
provides a function called createPageLocal.  The returned object is used
to store local page variables that can be restored when a page is
resubmitted (ie back button is used).  There is not much documentation
surrounding this feature.  I was not able to solve my problem using it.
Either I was using it incorrectly, or it's the wrong solution.  Does
anyone have any experience with this feature, and if so is there
documentation for it.  Would it solve my problem, or am I running down a
rabbit hole?

 

I would think that we are not the first to run into this problem.
However, I have not found any mention of it on the forums, wiki, or
supporting cocoon sites.

 

Does anyone have an answer to this problem?

 

Thanks in advance,

 

 

Craig W Gulliver 

 

 


Mime
View raw message