You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Petter Måhlén <pe...@elevance.se> on 2004/03/17 17:46:36 UTC
Page recorder locked after commit
Hi,
I have a problem with component parameters and properties. I have a
component that presents a table of some items and allows the user to create
new or delete existing items depending on some input parameters. In the
component specification, I have the following:
------
<parameter name="taskList" type="java.util.List" direction="in"
required="no">
<description>
A list of the tasks for which new reports should be created.
</description>
</parameter>
<snip />
<property-specification name="taskReports"
type="org.apache.tapestry.form.ListEditMap" persistent="yes" />
----------
Previously, I bound the taskReports property to a member of the Visit, but
that's really ugly, I think, so I would prefer using a persistent property
like above. The ListEditMap is initialised based on the taskList parameter,
and I do that in the prepareForRender() method. However, that gives me an
ApplicationRuntimeException with the following message:
Page recorder for page Report is locked after a commit(), but received a
change to property taskReports of component Report/oldReports.
And I cannot use the pageBeginRender() method to do initialisation either,
because at that time the taskList parameter has not yet been initialised,
being direction "in". I suppose I could try changing the direction of the
parameter, but there are two problems with that: 1) it is an "in" parameter
only (not changed by the component), and 2) I honestly don't understand the
description of the different directions in the documentation so I can't say
what would be the best choice.
Does somebody know of a way out of this that doesn't bloat my Visit object?
What is the meaning of the exception?
/ Petter
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org