public static void contributeComponentMessagesSource( @Value("/org/got5/tapestry5/JQueryCatalog.properties") Resource jQueryCatalog, OrderedConfiguration<Resource> configuration) { // Catalog used to store messages from mixins configuration.add("JQueryCatalog", jQueryCatalog); } }
@Override public <T> T provide(Class<T> objectType, AnnotationProvider annotationProvider, ObjectLocator locator) { Value annotation = annotationProvider.getAnnotation(Value.class); if (annotation == null) return null; String value = annotation.value(); Object expanded = symbolSource.expandSymbols(value); IntermediateType intermediate = annotationProvider.getAnnotation(IntermediateType.class); if (intermediate != null) expanded = typeCoercer.coerce(expanded, intermediate.value()); return typeCoercer.coerce(expanded, objectType); } }
@Override public <T> T provide(Class<T> objectType, AnnotationProvider annotationProvider, ObjectLocator locator) { Value annotation = annotationProvider.getAnnotation(Value.class); if (annotation == null) return null; String value = annotation.value(); Object expanded = symbolSource.expandSymbols(value); IntermediateType intermediate = annotationProvider.getAnnotation(IntermediateType.class); if (intermediate != null) expanded = typeCoercer.coerce(expanded, intermediate.value()); return typeCoercer.coerce(expanded, objectType); } }
@Contribute(ComponentMessagesSource.class) public static void provideLibraryMessages( OrderedConfiguration<Resource> configuration, @Value("classpath:org/apache/tapestry5/kaptcha/tapestry-kaptcha.properties") Resource kaptchaCatalog) { configuration.add("TapestryKaptcha", kaptchaCatalog, "before:AppCatalog"); }
/** * Before 5.2, an @Inject was necessary here. Now we're testing that it no longer is necessary. */ public FieService build_with_forced_injection(@Value("Injected") String string) { assertEquals(string, expectedString); return fie; }
public static void contributeComponentMessagesSource(@Value("context:WEB-INF/pre-app.properties") Resource preappResource, OrderedConfiguration<Resource> configuration) { configuration.add("PreApp", preappResource, "before:AppCatalog"); }