Search in sources :

Example 16 with SymbolSource

use of org.apache.tapestry5.ioc.services.SymbolSource in project tapestry-5 by apache.

the class SpringModule method addSymbolSourceAsPropertyCustomizerForSpringBeans.

@Contribute(ApplicationContextCustomizer.class)
public static void addSymbolSourceAsPropertyCustomizerForSpringBeans(OrderedConfiguration<ApplicationContextCustomizer> configuration, final SymbolSource symbolSource) {
    ApplicationContextCustomizer beanFactoryPostProcessorCustomizer = new ApplicationContextCustomizer() {

        @Override
        public void customizeApplicationContext(ServletContext servletContext, ConfigurableWebApplicationContext applicationContext) {
            applicationContext.addBeanFactoryPostProcessor(new SymbolBeanFactoryPostProcessor(symbolSource));
        }
    };
    configuration.add("BeanFactoryPostProcessorCustomizer", beanFactoryPostProcessorCustomizer);
}
Also used : ConfigurableWebApplicationContext(org.springframework.web.context.ConfigurableWebApplicationContext) ServletContext(javax.servlet.ServletContext) SymbolBeanFactoryPostProcessor(org.apache.tapestry5.internal.spring.SymbolBeanFactoryPostProcessor) ApplicationContextCustomizer(org.apache.tapestry5.spring.ApplicationContextCustomizer) Contribute(org.apache.tapestry5.ioc.annotations.Contribute)

Aggregations

SymbolSource (org.apache.tapestry5.ioc.services.SymbolSource)15 Test (org.testng.annotations.Test)13 ComponentModel (org.apache.tapestry5.model.ComponentModel)9 MetaDataLocator (org.apache.tapestry5.services.MetaDataLocator)9 ComponentResources (org.apache.tapestry5.ComponentResources)7 Asset (org.apache.tapestry5.Asset)3 AssetSource (org.apache.tapestry5.services.AssetSource)3 AnnotationProvider (org.apache.tapestry5.commons.AnnotationProvider)2 ObjectLocator (org.apache.tapestry5.commons.ObjectLocator)2 ObjectProvider (org.apache.tapestry5.commons.ObjectProvider)2 TypeCoercer (org.apache.tapestry5.commons.services.TypeCoercer)2 AssetPathProcessor (com.flowlogix.web.services.internal.AssetPathProcessor)1 Formatter (java.util.Formatter)1 ServletContext (javax.servlet.ServletContext)1 Path (org.apache.tapestry5.annotations.Path)1 Resource (org.apache.tapestry5.commons.Resource)1 SymbolBeanFactoryPostProcessor (org.apache.tapestry5.internal.spring.SymbolBeanFactoryPostProcessor)1 Contribute (org.apache.tapestry5.ioc.annotations.Contribute)1 ClasspathResource (org.apache.tapestry5.ioc.internal.util.ClasspathResource)1 ServiceActivity (org.apache.tapestry5.ioc.services.ServiceActivity)1