Examples of FormSupport


Examples of org.apache.tapestry5.services.FormSupport

        MessageFormatter formatter = mockMessageFormatter();
        Object inputValue = new Object();
        ComponentResources resources = mockComponentResources();
        Messages containerMessages = mockMessages();
        Integer five = 5;
        FormSupport fs = mockFormSupport();
        ValidatorMacro macro = mockValidatorMacro();
        Messages globalMessages = mockMessages();

        Map<String, Validator> map = singletonMap("minLength", validator);
View Full Code Here

Examples of org.apache.tapestry5.services.FormSupport

        MessageFormatter formatter = mockMessageFormatter();
        Object inputValue = new Object();
        ComponentResources resources = mockComponentResources();
        Messages containerMessages = mockMessages();
        Integer five = 5;
        FormSupport fs = mockFormSupport();
        ValidatorMacro macro = mockValidatorMacro();
        Messages globalMessages = mockMessages();

        Map<String, Validator> map = singletonMap("minLength", validator);
View Full Code Here

Examples of org.apache.tapestry5.services.FormSupport

     * Renders a &lt;div&gt; tag and provides an override of the {@link org.apache.tapestry5.services.FormSupport}
     * environmental.
     */
    void beginRender(MarkupWriter writer)
    {
        FormSupport formSupport = environment.peekRequired(FormSupport.class);

        clientId = resources.isBound("id") ? idParameter : javascriptSupport.allocateClientId(resources);

        hiddenFieldPositioner = new HiddenFieldPositioner(writer, rules);

        Element element = writer.element(this.element, "id", clientId);

        resources.renderInformalParameters(writer);

        if (!visible)
            element.addClassName(CSSClassConstants.INVISIBLE);

        clientBehaviorSupport.addFormFragment(clientId, alwaysSubmit, show, hide, visibleBound);

        componentActions = new ComponentActionSink(logger, clientDataEncoder);

        // Here's the magic of environmentals ... we can create a wrapper around
        // the normal FormSupport environmental that intercepts some of the behavior.
        // Here we're setting aside all the actions inside the FormFragment so that we
        // can control whether those actions occur when the form is submitted.

        FormSupport override = new FormSupportAdapter(formSupport)
        {
            @Override
            public <T> void store(T component, ComponentAction<T> action)
            {
                componentActions.store(component, action);
View Full Code Here

Examples of org.apache.tapestry5.services.FormSupport

    }

    @Test
    public void trigger_immediate()
    {
        FormSupport support = mockFormSupport();
        ComponentResources resources = mockComponentResources();
        Heartbeat heartbeat = new HeartbeatImpl();
        Request request = mockRequest();

        String elementName = "myname";
View Full Code Here

Examples of org.apache.tapestry5.services.FormSupport

    @Test
    public void test_imagesubmit_event_fired()
    {
        Request request = mockRequest();
        final ComponentResources resources = mockComponentResources();
        FormSupport formSupport = mockFormSupport();
        Asset image = mockAsset();

        String elementName = "myname";

        train_getParameter(request, Form.SUBMITTING_ELEMENT_ID, null);
        train_getParameter(request, elementName + ".x", "15");

        formSupport.defer(isA(Runnable.class));

        replay();

        Submit submit = new Submit(request);
View Full Code Here

Examples of org.apache.tapestry5.services.FormSupport

    @Test
    public void test_submit_event_fired()
    {
        Request request = mockRequest();
        final ComponentResources resources = mockComponentResources();
        FormSupport formSupport = mockFormSupport();

        String elementName = "myname";

        train_getParameter(request, Form.SUBMITTING_ELEMENT_ID, null);
        train_getParameter(request, elementName, "login");

        formSupport.defer(isA(Runnable.class));

        replay();

        Submit submit = new Submit(request);
View Full Code Here

Examples of org.apache.tapestry5.services.FormSupport

        Field field = mockField();
        Messages messages = mockMessages();
        Locale locale = Locale.ENGLISH;
        Class propertyType = Map.class;
        TranslatorSource ts = mockTranslatorSource();
        FormSupport fs = mockFormSupport();
        Translator translator = mockTranslator("maptrans", Map.class);
        Messages globalMessages = mockMessages();
        MessageFormatter formatter = mockMessageFormatter();
        MarkupWriter writer = mockMarkupWriter();
        String label = "Field Label";
View Full Code Here

Examples of org.apache.tapestry5.services.FormSupport

        Field field = mockField();
        Messages messages = mockMessages();
        Locale locale = Locale.ENGLISH;
        Class propertyType = Map.class;
        TranslatorSource ts = mockTranslatorSource();
        FormSupport fs = mockFormSupport();
        Translator translator = mockTranslator("maptrans", Map.class);
        Messages globalMessages = mockMessages();
        MessageFormatter formatter = mockMessageFormatter();
        MarkupWriter writer = mockMarkupWriter();
        String label = "Field Label";
View Full Code Here

Examples of org.apache.tapestry5.services.FormSupport

        Field field = mockField();
        Messages messages = mockMessages();
        Locale locale = Locale.ENGLISH;
        Class propertyType = Map.class;
        TranslatorSource ts = mockTranslatorSource();
        FormSupport fs = mockFormSupport();
        Translator translator = mockTranslator("maptrans", Map.class);
        MessageFormatter formatter = mockMessageFormatter();
        MarkupWriter writer = mockMarkupWriter();
        String label = "My Label";
        String message = "Formatted Message";
View Full Code Here

Examples of org.apache.tapestry5.services.FormSupport

        Field field = mockField();
        Messages messages = mockMessages();
        Locale locale = Locale.ENGLISH;
        Class propertyType = Map.class;
        TranslatorSource ts = mockTranslatorSource();
        FormSupport fs = mockFormSupport();
        Translator translator = mockTranslator("maptrans", Map.class);
        MessageFormatter formatter = mockMessageFormatter();
        MarkupWriter writer = mockMarkupWriter();
        String label = "My Label";
        String message = "Formatted Message";
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.