Currently, I override the onBeforeRender() when I want to make some changes to the modelObject used by my custom component. For instance, if (condition) {//update model object from service}. This is what I mean by "own logic". I thought that it would be interesting idea to decouple this logic from each component and move it to IComponentOnBeforeRenderListener implementation (just thinking out loud :) ). But since the listeners are fired actually after onBefeforeRender, it is too late.
PS: if you think that this is not a good idea, then never mind :) Alex. Matej Knopp-2 wrote: > > Could you please specify what it is that you can't do now? The thread > is rather long and I don't have time to go through it all. I don't > think we should reverse the other. What exactly do you mean by "own > logic" ? > > -Matej > > On 9/17/07, Alex Objelean <[EMAIL PROTECTED]> wrote: >> >> I've noticed that the execution order inside the Component#beforeRender() >> is >> the following: >> >> onBeforeRender(); >> getApplication().notifyComponentOnBeforeRenderListeners(this); >> >> I wonder if it shouldn't be changed as follows: >> >> getApplication().notifyComponentOnBeforeRenderListeners(this); >> onBeforeRender(); >> >> >> The reason is that the super.onbeforerender() call has to be done last >> when >> you want to add your own logic (See >> http://www.nabble.com/Why-the-AbstractRepeater-onBeforeRender-is-final-wicket-1.3.0-SNAPSHOT-%286-sept-2007%29--tf4391492.html#a12520558 >> this topic) >> >> Any thoughts? >> >> Alex. >> >> -- >> View this message in context: >> http://www.nabble.com/Question-about-notifyComponentOnBeforeRenderListeners-tf4466023.html#a12733888 >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Question-about-notifyComponentOnBeforeRenderListeners-tf4466023.html#a12737607 Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]