Package org.apache.tapestry5.annotations

Examples of org.apache.tapestry5.annotations.Meta


        replay();

        ClassTransformation ct = createClassTransformation(ParentClass.class, logger);

        Meta meta = ct.getAnnotation(Meta.class);

        assertNotNull(meta);

        // Try again (the annotation will be cached). Use an annotation
        // that will not be present.
View Full Code Here


        replay();

        ClassTransformation ct = createClassTransformation(ChildClassInheritsAnnotation.class, logger);

        Meta meta = ct.getAnnotation(Meta.class);

        assertNull(meta);

        verify();
    }
View Full Code Here

    @Test
    public void has_meta_data()
    {
        ClassTransformation ct = mockClassTransformation();
        MutableComponentModel model = mockMutableComponentModel();
        Meta annotation = newMock(Meta.class);

        train_getAnnotation(ct, Meta.class, annotation);

        expect(annotation.value()).andReturn(new String[]
                { "foo=bar", "baz=biff" });

        model.setMeta("foo", "bar");
        model.setMeta("baz", "biff");
View Full Code Here

public class MetaWorker implements ComponentClassTransformWorker
{

    public void transform(ClassTransformation transformation, MutableComponentModel model)
    {
        Meta annotation = transformation.getAnnotation(Meta.class);

        if (annotation == null)
            return;

        for (String meta : annotation.value())
        {
            KeyValue kv = TapestryInternalUtils.parseKeyValue(meta);

            model.setMeta(kv.getKey(), kv.getValue());
        }
View Full Code Here

                {
                    setupRequestFromLink(link);
                    continue;
                }

                Document result = response.getRenderedDocument();

                if (result == null)
                    throw new RuntimeException(String.format("Render of page '%s' did not result in a Document.",
                            pageName));
View Full Code Here

    {
        List<OptionModel> options = CollectionFactory.newList();

        for (Locale l : supportedLocales)
        {
            options.add(new OptionModelImpl(l.getDisplayName(l), l));
        }

        return new SelectModelImpl(null, options);
    }
View Full Code Here

        for (Locale l : supportedLocales)
        {
            options.add(new OptionModelImpl(l.getDisplayName(l), l));
        }

        return new SelectModelImpl(null, options);
    }
View Full Code Here

    {
        this.parent = parent;
        this.transformer = transformer;
        this.logger = logger;
        this.internalRequestGlobals = internalRequestGlobals;
        this.changeTracker = new URLChangeTracker(classpathURLConverter);

        initializeService();
    }
View Full Code Here

        ValidationMessagesSource messagesSource = mockValidationMessagesSource();
        Validator validator = mockValidator();
        TypeCoercer coercer = mockTypeCoercer();
        FieldComponent field = newFieldComponent();
        Messages messages = mockMessages();
        MessageFormatter formatter = mockMessageFormatter();
        Object inputValue = new Object();
        ComponentResources resources = mockComponentResources();
        Messages containerMessages = mockMessages();
        FormSupport fs = mockFormSupport();
View Full Code Here

    {
        ValidationMessagesSource messagesSource = mockValidationMessagesSource();
        Validator validator = mockValidator();
        TypeCoercer coercer = mockTypeCoercer();
        FieldComponent field = newFieldComponent();
        MessageFormatter formatter = mockMessageFormatter();
        Object inputValue = new Object();
        ComponentResources resources = mockComponentResources();
        Messages containerMessages = mockMessages();
        FormSupport fs = mockFormSupport();
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.annotations.Meta

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.