Package org.apache.tapestry5.internal.structure

Examples of org.apache.tapestry5.internal.structure.ComponentPageElement


    @SuppressWarnings("unchecked")
    @Test
    public void validator_with_no_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();
        Messages containerMessages = mockMessages();
        FormSupport fs = mockFormSupport();

        Map<String, Validator> map = singletonMap("required", validator);

        train_getConstraintType(validator, null);

        train_getFormValidationId(fs, "form");

        train_getComponentResources(field, resources);

        train_getId(resources, "fred");
        train_getContainerMessages(resources, containerMessages);
        train_contains(containerMessages, "form-fred-required-message", false);
        train_contains(containerMessages, "fred-required-message", false);

        train_getLocale(resources, Locale.FRENCH);

        train_getValidationMessages(messagesSource, Locale.FRENCH, messages);

        train_getMessageKey(validator, "key");
        train_getMessageFormatter(messages, "key", formatter);

        train_isRequired(validator, false);
        train_getValueType(validator, Object.class);
        validator.validate(field, null, formatter, inputValue);

        replay();

        FieldValidatorSource source = new FieldValidatorSourceImpl(messagesSource, coercer, fs, map, null);
View Full Code Here


    @Test
    public void nested_element_within_page()
    {
        RequestPageCache cache = mockRequestPageCache();
        Page page = mockPage();
        ComponentPageElement element = mockComponentPageElement();
        Component component = mockComponent();
        ComponentClassResolver resolver = mockComponentClassResolver();

        train_get(cache, PAGE_NAME, page);
View Full Code Here

        {
            mixinId = nestedId.substring(dollarx + 1);
            nestedId = nestedId.substring(0, dollarx);
        }

        ComponentPageElement element = page.getComponentElementByNestedId(nestedId);

        if (mixinId == null)
            return element.getComponent();

        ComponentResources resources = element.getMixinResources(mixinId);

        return resources.getComponent();
    }
View Full Code Here

    public void page_link()
    {
        Request request = mockRequest();
        Response response = mockResponse();
        Page page = mockPage();
        ComponentPageElement rootElement = mockComponentPageElement();
        LinkFactoryListener listener = mockLinkFactoryListener();
        ComponentInvocationMap map = mockComponentInvocationMap();
        RequestPathOptimizer optimizer = mockRequestPathOptimizer();
        RequestSecurityManager securityManager = mockRequestSecurityManager();
View Full Code Here

    public void secure_page_link()
    {
        Request request = mockRequest();
        Response response = mockResponse();
        Page page = mockPage();
        ComponentPageElement rootElement = mockComponentPageElement();
        LinkFactoryListener listener = mockLinkFactoryListener();
        ComponentInvocationMap map = mockComponentInvocationMap();
        RequestPathOptimizer optimizer = mockRequestPathOptimizer();
        RequestSecurityManager securityManager = mockRequestSecurityManager();
View Full Code Here

    public void page_link_by_name()
    {
        Request request = mockRequest();
        Response response = mockResponse();
        Page page = mockPage();
        ComponentPageElement rootElement = mockComponentPageElement();
        LinkFactoryListener listener = mockLinkFactoryListener();
        ComponentInvocationMap map = mockComponentInvocationMap();
        RequestPageCache cache = mockRequestPageCache();
        RequestPathOptimizer optimizer = mockRequestPathOptimizer();
        RequestSecurityManager securityManager = mockRequestSecurityManager();
View Full Code Here

    public void page_link_for_root_index()
    {
        Request request = mockRequest();
        Response response = mockResponse();
        Page page = mockPage();
        ComponentPageElement rootElement = mockComponentPageElement();
        LinkFactoryListener listener = mockLinkFactoryListener();
        ComponentInvocationMap map = mockComponentInvocationMap();
        RequestPageCache cache = mockRequestPageCache();
        RequestPathOptimizer optimizer = mockRequestPathOptimizer();
        RequestSecurityManager securityManager = mockRequestSecurityManager();
View Full Code Here

    public void page_link_for_index_in_folder()
    {
        Request request = mockRequest();
        Response response = mockResponse();
        Page page = mockPage();
        ComponentPageElement rootElement = mockComponentPageElement();
        LinkFactoryListener listener = mockLinkFactoryListener();
        ComponentInvocationMap map = mockComponentInvocationMap();
        RequestPageCache cache = mockRequestPageCache();
        RequestPathOptimizer optimizer = mockRequestPathOptimizer();
        RequestSecurityManager securityManager = mockRequestSecurityManager();
View Full Code Here

    public void action_with_context_that_contains_periods()
    {
        Request request = mockRequest();
        Response response = mockResponse();
        Page page = mockPage();
        ComponentPageElement rootElement = mockComponentPageElement();
        LinkFactoryListener listener = mockLinkFactoryListener();
        ComponentInvocationMap map = mockComponentInvocationMap();
        RequestPageCache cache = mockRequestPageCache();
        RequestPathOptimizer optimizer = mockRequestPathOptimizer();
        PageRenderQueue queue = mockPageRenderQueue();
View Full Code Here

    {
        Request request = mockRequest();
        Response response = mockResponse();
        Page containingPage = mockPage();
        Page activePage = mockPage();
        ComponentPageElement rootElement = mockComponentPageElement();
        LinkFactoryListener listener = mockLinkFactoryListener();
        ComponentInvocationMap map = mockComponentInvocationMap();
        RequestPageCache cache = mockRequestPageCache();
        RequestPathOptimizer optimizer = mockRequestPathOptimizer();
        PageRenderQueue queue = mockPageRenderQueue();
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.internal.structure.ComponentPageElement

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.