Hi!
As far as I can remember, the rewind phase happens when an event request
is received. Tapestry renders the page again, without outputting any HTML,
to restore the page state (i.e. their fields) to what it was while the
real rendering happened. The hint is to check whether the current
rendering is a rewind one and try to keep your data and logic in the exact
same state as the real render. In other words, don't change your data
until the rewind phase is done. Yes, it's a pain sometimes, and I'm quite
happy Tapestry 5 got rid of it.
I've googled for 'tapestry rewind phase' (without the quotes) and I could
find many pages describing it. For example,
http://nate-tech.blogspot.com.br/2006/01/why-tapestrys-crazy-rewind-is-good.html.
This paragraph is quite good:
"(...) Second, because Tapestry applies values from the request into the
model and calles listener methods DURING the "rewind cycle", model's data
may change in the middle of the re-render, and this change in the data can
change the remainder of the page. This leads to a "Stale Session" error,
since the components in the re-render will now no longer match the
components of the original render. This issue can be difficult to
mitigate. (...)"
On Thu, 04 Jul 2013 16:36:52 -0300, Stephen Munro
<[email protected]> wrote:
Hello,
I am having an issue with a Tapestry 4 page, which comprises of a fairly
large form build up with conditional elements. The problem is that when I
click the submit button, the application crashes with the following:
'Rewind of form <blah> expected only 0 form elements, but an additional
id
was requested by component <blah>/null.'
I can't really find much on what causes this particular error to happen
and
the posts I've found on Nabble that mention this doesn't really highlight
1. How it happens and 2. What strategies to put in place to deal with it.
I know the world has moved on from Tapestry 4, but we don't have
the luxury of moving forward. If anyone can provide answers to the above
two points, I would be eternally grateful.
As far as I can tell, the rewind will try to rebuild the page and for
some
reason, it finds something missing that was in place for the submitted
form
and it fails..
--
Thiago H. de Paula Figueiredo
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]