You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Joel Trunick <Jo...@SmartPrice.com> on 2003/06/17 18:43:44 UTC

Interpretation of error

"Page recorder for page PopAddInfo is locked after a commit(), but received
a change to property planId of component PopAddInfo."

Could someone interpret, or better yet, comment on what I am doing wrong?
Here is the relevant code. I'm guessing I can call setPlanId() from
beginRender(), but not sure what to do. This is displayed as a popup window,
which is the reason I'm passing in the ID as a parameter, not through a
setter call.

	public void beginResponse(IMarkupWriter writer, IRequestCycle cycle)
		throws RequestCycleException {
		super.beginResponse(writer, cycle);
		
		setPlanId( new Integer(
cycle.getRequestContext().getParameter("planId") ) );
	}
	
	public Integer getPlanId() {
		return this.planId;
	}
	public void setPlanId( Integer value ) {
		this.planId = value;
		fireObservedChange( "planId",value );
	}

Joel

Re: Interpretation of error

Posted by Eric Schneider <er...@centralparksoftware.com>.
Joel,

Try just setting the property directly and see if you have different
results.

planId = new Integer(cycle.getRequestContext().getParameter("planId") ) ;

On a side note, I never (in any of my apps) override beginRender().  I don't
have specific reason, but I think I remember someone mentioning that
prepareForRender() is a more appropriate place for these things.

Cheers.
e.

----- Original Message ----- 
From: "Joel Trunick" <Jo...@SmartPrice.com>
To: "'Tapestry users'" <ta...@jakarta.apache.org>
Sent: Tuesday, June 17, 2003 12:43 PM
Subject: Interpretation of error


>
> "Page recorder for page PopAddInfo is locked after a commit(), but
received
> a change to property planId of component PopAddInfo."
>
> Could someone interpret, or better yet, comment on what I am doing wrong?
> Here is the relevant code. I'm guessing I can call setPlanId() from
> beginRender(), but not sure what to do. This is displayed as a popup
window,
> which is the reason I'm passing in the ID as a parameter, not through a
> setter call.
>
> public void beginResponse(IMarkupWriter writer, IRequestCycle cycle)
> throws RequestCycleException {
> super.beginResponse(writer, cycle);
>
> setPlanId( new Integer(
> cycle.getRequestContext().getParameter("planId") ) );
> }
>
> public Integer getPlanId() {
> return this.planId;
> }
> public void setPlanId( Integer value ) {
> this.planId = value;
> fireObservedChange( "planId",value );
> }
>
> Joel
>