but that can't be done on instantiation because you have no idea when the model is set. also you can have inhertiable models and so on.
But you want to do something when it has a specific model? That can already be done Let the model implement IComponentAssignedModel then you get a call: wrapOnAssignment just return this (that should work) and do you thing on the component you get johan On 5/12/07, Ryan Sonnek <[EMAIL PROTECTED]> wrote:
http://wicket-stuff.svn.sourceforge.net/viewvc/wicket-stuff/trunk/wicketstuff-hibernate-behavior/src/main/java/org/wicketstuff/hibernate/HibernateAnnotationComponentInstantiaionListener.java?revision=2135&view=markup If you look at the source, it should be a little easier to follow. I'm trying to register a listener that inspects the models of *all* components that will automatically register validators for that component. On 5/12/07, Johan Compagner <[EMAIL PROTECTED]> wrote: > what do you want to do there? > isn't that something for an IAuthorizationStrategy ? > > johan > > > On 5/12/07, Ryan Sonnek <[EMAIL PROTECTED]> wrote: > > > > I'm proposing adding a method to the IComponentInstantiationListener > > (or a new interface) that would be invoked when a components model is > > bound/attached/whatever. > > > > I'd like to register a component listener that listens to every > > component in my application and can configure it appropriately (by > > inspecting the model and it's annotations). > > > > Please let me know if this isn't really a good direction for wicket, > > and if there should be a different way to do this. Thanks. > > > > Ryan > > > > On 5/11/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > > > On 5/11/07, Ryan Sonnek <[EMAIL PROTECTED]> wrote: > > > > What exactly should a component instantiation listener be able to do? > > > > I'm trying to build one that will inspect the model of every > > > > component, but the model is not yet bound. is there a way to register > > > > a listener that is notified once the model is bound? > > > > > > There is none currenlty. Though I can imagine one. If you can argue a > > > good use case, you could propose this on the dev list. > > > > > > Eelco > > > > > > > > ------------------------------------------------------------------------- > > > This SF.net email is sponsored by DB2 Express > > > Download DB2 Express C - the FREE version of DB2 express and take > > > control of your XML. No limits. Just data. Click to get it now. > > > http://sourceforge.net/powerbar/db2/ > > > _______________________________________________ > > > Wicket-user mailing list > > > [EMAIL PROTECTED] > > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > >
