Package org.apache.tapestry5.services

Examples of org.apache.tapestry5.services.ComponentClassTransformWorker


    public void multiple_validators_via_specification() throws Exception
    {
        ValidationMessagesSource messagesSource = mockValidationMessagesSource();
        Validator required = mockValidator();
        Validator minLength = mockValidator();
        TypeCoercer coercer = mockTypeCoercer();
        FieldComponent field = newFieldComponent();
        Messages messages = mockMessages();
        MessageFormatter requiredFormatter = mockMessageFormatter();
        MessageFormatter minLengthFormatter = mockMessageFormatter();
        Object inputValue = "input value";
View Full Code Here


    @Test
    public void validator_with_constraint() throws Exception
    {
        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();
View Full Code Here

        }

        // Let subclasses do more.
        configure(config);

        renderSupport.addInit("autocompleter", new JSONArray(id, menuId, link.toAbsoluteURI(), config));
    }
View Full Code Here

        "class", "t-autocomplete-menu");
        writer.end();

        Link link = resources.createEventLink(EVENT_NAME);

        JSONObject config = new JSONObject();
        config.put("paramName", PARAM_NAME);
        config.put("indicator", loaderId);

        if (resources.isBound("minChars"))
            config.put("minChars", minChars);

        if (resources.isBound("frequency"))
            config.put("frequency", frequency);

        if (resources.isBound("tokens"))
        {
            for (int i = 0; i < tokens.length(); i++)
            {
                config.accumulate("tokens", tokens.substring(i, i + 1));
            }
        }

        // Let subclasses do more.
        configure(config);
View Full Code Here

    }

    @Test
    public void access_to_public_void_throws_exception() throws Exception
    {
        Object instance = transform(MethodAccessSubject.class, new ComponentClassTransformWorker()
        {
            public void transform(ClassTransformation transformation, MutableComponentModel model)
            {
                transformation.addImplementedInterface(Runnable.class);
View Full Code Here

    }

    @Test
    public void access_to_public_method_with_argument_and_return_value() throws Exception
    {
        Object instance = transform(MethodAccessSubject.class, new ComponentClassTransformWorker()
        {
            public void transform(ClassTransformation transformation, MutableComponentModel model)
            {
                transformation.addImplementedInterface(ProcessInteger.class);
View Full Code Here

    }

    @Test
    public void access_to_private_method() throws Exception
    {
        Object instance = transform(MethodAccessSubject.class, new ComponentClassTransformWorker()
        {
            public void transform(ClassTransformation transformation, MutableComponentModel model)
            {
                transformation.addImplementedInterface(ProcessStringAndInteger.class);
View Full Code Here

    public static final TransformMethodSignature RUN = new TransformMethodSignature("run");

    @Test
    public void access_to_protected_void_no_args_method() throws Exception
    {
        Object instance = transform(MethodAccessSubject.class, new ComponentClassTransformWorker()
        {
            public void transform(ClassTransformation transformation, MutableComponentModel model)
            {
                transformation.addImplementedInterface(Runnable.class);
View Full Code Here

        train_getMethodAnnotation(tf, sig, SetupRender.class, null);

        replay();

        ComponentClassTransformWorker worker = new ComponentLifecycleMethodWorker(
                TransformConstants.SETUP_RENDER_SIGNATURE, SetupRender.class, false);

        worker.transform(tf, model);

        verify();
    }
View Full Code Here

        train_findMethods(tf, TransformConstants.SETUP_RENDER_SIGNATURE);

        replay();

        ComponentClassTransformWorker worker = new ComponentLifecycleMethodWorker(
                TransformConstants.SETUP_RENDER_SIGNATURE, SetupRender.class, false);

        worker.transform(tf, model);

        verify();
    }
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.services.ComponentClassTransformWorker

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.