Hi everybody, May sound stupid: is the contructor really the best place for adding children to a component or is there a better one, e.g. onBeforeRender?
All examples I see keep doing this in the constructor or in an init method which is called by the constructor, however, I realized that there are some problems e.g. if the component needs a string resource from the page or anything else from a parent element (because it is not attached to the page while still not being fully constructed). Are there any drawbacks when doing this in onBeforeRender? Btw: If you say "a component should not need to access to its parent", you are probably right for most cases, but there are scenarious where it does. Thanks for inspiration :) -- View this message in context: http://www.nabble.com/Adding-child-components-in-constructor--Best-practice--tp18760471p18760471.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]