I'm trying to add a custom made LinkFactoryListener to the existing
LinkFactory-service, but with now success. I must admit I'm really not
fluent with Tapestr-ioc so I think it might me something obvious. 

I tried several things, for instance trying to contribute a listener to the
LinkFactory (if it can be contributed to, how do you know for sure? ), but
that doens't work. 

building a LinkFactory as a service and  adding the built
LinkFactoryListener (see below) doesn't work either error --> "Service id
'LinkFactory' has already been defined".

Any suggestions? 
Thanks,
-----------

public LinkFactoryListener buildSessionStripLinkFactoryListener()
        {
                return new LinkFactoryListener()
                {
                        public void createdActionLink(Link link) {
                                for(String name: link.getParameterNames()){
                                        System.out.println(name);
                                }
                        }

                        public void createdPageLink(Link link) {
                                for(String name: link.getParameterNames()){
                                        System.out.println(name);
                                }
                        }
                };
        }

public LinkFactory build(
                        @InjectService("LinkFactory") LinkFactory linkFactory, 
                        @InjectService("SessionStripLinkFactoryListener") 
LinkFactoryListener
listener){
                linkFactory.addListener(listener);
                return linkFactory;
        }
-- 
View this message in context: 
http://www.nabble.com/T5%3A-how-to-add-a-LinkFactoryListener-to-the-existing-linkFactory-service-tp18013026p18013026.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to