Well.... The most non-intrusive version might be to overwrite the init
method in your application and register a componentInstantiationListeners.
There you can look for your own annotations.

BUT the simplest way might be to attach a filter property to the
PaxWicketBean annotation and handle it in the already
existing OSGiServiceRegistryProxyTargetLocator class (this class does an
injection similar to blueprint/spring but solely based on the osgi
registry. Would this be an option? WDYT?

BTW, don't worry about the release cycles if we include the change directly
into pax-wicket. We can release 1.2.0 (including this change) anytime we
like :-)

Kind regards,
Andreas


On Fri, Nov 2, 2012 at 6:21 AM, Hendy Irawan <he...@soluvas.com> wrote:

> Hi all,
>
> How do I provide a custom annotation processor (i.e. similar to
> @PaxWicketBean, but our own) ?
>
> Right now I subclass WebPage and create all pages based on that subclass.
> But it doesn't feel right.
>
> What the special does is at construction, it inspects the field
> annotations and get OSGi services according to our own conventions (OSGi
> filters based on application key, so it's not possible to do this purely
> via Blueprint).
>
> And onAfterRender(), it ungets the services from the BundleContext.
>
> But this only works for Page. If I want to do this for Panel etc. I have
> to recreate it all over again.
>
> Thank you.
>
> --
> Hendy Irawan - on Twitter <http://twitter.com/hendybippo> - on 
> LinkedIn<http://id.linkedin.com/in/hendyirawan>
> Web Developer | Bippo Indonesia <http://www.bippo.co.id/> | Akselerator
> Bisnis | Bandung
>
>
> _______________________________________________
> general mailing list
> general@lists.ops4j.org
> http://lists.ops4j.org/mailman/listinfo/general
>
>
_______________________________________________
general mailing list
general@lists.ops4j.org
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to