1) @InjectComponent to inject a component instance that is specified in the template.
2) Check out:
http://tapestry.apache.org/tapestry5/guide/persist.html
See the section under the heading:
Clearing Persistent Fields

Cheers,

Robert

On Jan 20, 2010, at 1/207:50 PM , Hilco Wijbenga wrote:

Hi all,

I have a page (MyPage) with an embedded component (MyComponent). The
component uses @Persist to store a value (@Persist String myValue;).

This all works (of course). But I noticed that when I jump from
domain.com/index to domain.com/mypage, myValue still has the value
from last time. How do I clear it?

I tried to use @Inject MyComponent myComponent in MyPage so that I
could clear myValue in the pageDetached method but apparently it's not
possible to inject a component?

Any advice would be appreciated (also comments about this approach, is
it wrong to @Persist values in a component?).

Cheers,
Hilco

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to