Package org.apache.tapestry5.services.pageload

Examples of org.apache.tapestry5.services.pageload.ComponentResourceSelector


    @SuppressWarnings("unchecked")
    @Test
    public void single_validator_via_specification() throws Exception
    {
        ValidationMessagesSource messagesSource = mockValidationMessagesSource();
        Validator validator = mockValidator();
        TypeCoercer coercer = mockTypeCoercer();
        FieldComponent field = newFieldComponent();
        Messages messages = mockMessages();
        MessageFormatter formatter = mockMessageFormatter();
View Full Code Here


    @SuppressWarnings("unchecked")
    @Test
    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();
View Full Code Here

    @SuppressWarnings("unchecked")
    @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();
View Full Code Here

        messagesSource.checkForUpdates();
    }

    public Messages getMessages(ComponentModel componentModel, Locale locale)
    {
        return getMessages(componentModel, new ComponentResourceSelector(locale));
    }
View Full Code Here

        return messagesSource.getMessages(bundle, selector);
    }

    public Messages getApplicationCatalog(Locale locale)
    {
        return messagesSource.getMessages(appCatalogBundle, new ComponentResourceSelector(locale));
    }
View Full Code Here

    @Test
    public void accessor_methods()
    {
        ComponentPageElement root = mockComponentPageElement();
        ComponentResourceSelector selector = new ComponentResourceSelector(Locale.ENGLISH);

        replay();

        Page page = new PageImpl(LOGICAL_PAGE_NAME, selector, null, perThreadManager);
View Full Code Here

     * <p/>
     * If a template doesn't exist, then the missing ComponentTemplate is returned.
     */
    public ComponentTemplate getTemplate(ComponentModel componentModel, Locale locale)
    {
        return getTemplate(componentModel, new ComponentResourceSelector(locale));
    }
View Full Code Here

        clearCache();
    }

    public Page getPage(String canonicalPageName)
    {
        ComponentResourceSelector selector = selectorAnalyzer.buildSelectorForRequest();

        CachedPageKey key = new CachedPageKey(canonicalPageName, selector);

        // The while loop looks superfluous, but it helps to ensure that the Page instance,
        // with all of its mutable construction-time state, is properly published to other
View Full Code Here

        {
            public void execute(PageAssembly pageAssembly)
            {
                pageAssembly.checkForRecursion(componentClassName, embeddedAssembler.getLocation());

                ComponentResourceSelector selector = pageAssembly.page.getSelector();

                ComponentAssembler assemblerForSubcomponent = getAssembler(componentClassName, selector);

                // Remember: this pushes onto to the createdElement stack, but does not pop it.
View Full Code Here

        this.threadLocale = threadLocale;
    }

    public ComponentResourceSelector buildSelectorForRequest()
    {
        return new ComponentResourceSelector(threadLocale.getLocale());
    }
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.services.pageload.ComponentResourceSelector

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.