> 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: ((MyPage)getPage()).addMyEventListener(this).
>
> Or maybe a model is attached to the page and you don't want to pass it
> deep down the hierarchy but just obtain it from the page when needed.
>
> For now I'm just visiting page components first time the page is
> attached (that is, I'm overriding onAttach).
>
> This implementation is fine but maybe the aforementioned event should
> be a provided, standard one. What do you think about it?

Erm, how would you implement that? :)

I think you should use IComponentOnBeforeRenderListener in this case
(and note there is also IComponentOnAfterRenderListener).

Eelco

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to