Re: [Wicket-user] IComponent*POST*InstantiationListener

2007-07-24 Thread Eelco Hillenius
sometimes I find useful to be able to do some initialization once my component is attached to its hierarchy, mainly to be able to call getPage(). For example, if there are relevant events along some page lifecycle maybe panels contained in it may want to add themselves as listeners:

Re: [Wicket-user] IComponent*POST*InstantiationListener

2007-07-24 Thread Carlos Pita
Erm, how would you implement that? I'm overriding onAttach and setting a flag for doing initialization just during the first attachment. Is this wrong? I think you should use IComponentOnBeforeRenderListener in this case Still, I would have to keep the is first time? check, wouldn't I? I

Re: [Wicket-user] IComponent*POST*InstantiationListener

2007-07-24 Thread Matej Knopp
You can use the component.hasBeenRendererd() method to determine if it is the first time or not. -Matej On 7/24/07, Carlos Pita [EMAIL PROTECTED] wrote: Erm, how would you implement that? I'm overriding onAttach and setting a flag for doing initialization just during the first attachment.

[Wicket-user] IComponent*POST*InstantiationListener

2007-07-23 Thread Carlos Pita
Hi all, sometimes I find useful to be able to do some initialization once my component is attached to its hierarchy, mainly to be able to call getPage(). For example, if there are relevant events along some page lifecycle maybe panels contained in it may want to add themselves as listeners: