You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Argo Vilberg <wi...@gmail.com> on 2009/10/20 11:05:01 UTC
Re: T51.0.5: Persistent fields may not be up dated until after the
page has finished loading.
I return Page Object class.
If i use constructor before return Page class, then page has not finished
loading....
> Constructor?
>
> ERROR java.lang.RuntimeException: Exception assembling root component of
>> page SignDoc: Error persisting field SignDoc:sdocinfo: Persistent fields
>> may not be up dated until after the page has finished loading. This may be
>> due to a
>> persistent field with a default value. The default value should be
>> removed.
>>
>
> Don't initialize @Persist'ed fields in their declaration nor in
> constructor. Use event handler methods for that·
I must tell other page class, wich ID show.
> How can i communicate with two java class with persistent tapestry
>> annotation variable?
>>
>
> Just like you did in 5.0.14.
>
>
In 5.0.14
In tapestry 5.0.14 i use construction
Failid.java
signDoc.setSignedDocInfo(startSessionResponse.getSignedDocInfo());
return signDoc;
SignDoc.java
@Persist
private SignedDocInfo sdocinfo;
> --
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> http://www.arsmachina.com.br/thiago
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
Re: T51.0.5: Persistent fields may not be up dated until after the
page has finished loading.
Posted by Szemere Szemere <sz...@googlemail.com>.
The method you used in 5.0.14 is no longer allowed. If you search through
the archives you will find out why; though as far as I recall, it is due to
the method being insecure or causing potential sharing of variables across
user sesssions.
So you have to replace it with something else. Personally I moved this
initialisation to onActivate for directly accessed pages. For redirect pages
(your situation), you have to change the code to something like:
class Page1 {
@InjectPage
private Page2 redirectPage;
void onActive() {
redirectPage.setFoobar("widgets");
return redirectPage;
}
Other solutions may work too.
Szemere