Package org.apache.tapestry.engine

Examples of org.apache.tapestry.engine.Namespace


        IComponentSpecification spec = newSpec(location);
        spec.setLocation(_locationFixture);

        IPage page = newPage(spec, source, locale);

        INamespace namespace = new Namespace(null, null, newLibrarySpec(), null);

        page.setNamespace(namespace);

        return source.getMessages(page);
    }
View Full Code Here


        IPage page = newPage(spec, source, locale);

        ILibrarySpecification lspec = newLibrarySpec();
        lspec.setProperty(ComponentMessagesSourceImpl.NAMESPACE_PROPERTIES_NAME, propname);

        INamespace namespace = new Namespace(null, null, lspec, null);

        page.setNamespace(namespace);

        return source.getMessages(page);
    }
View Full Code Here

        source.setComponentResourceResolver(new ComponentResourceResolverImpl());

        IComponentSpecification spec = newSpec(MOCK1);
        spec.setLocation(_locationFixture);

        INamespace namespace = new Namespace(null, null, newLibrarySpec(), null);

        IPage page = newPage(spec, source, new Locale("fr"));
        page.setNamespace(namespace);

        assertEquals("multilocale_fr", source.getMessages(page).getMessage("multilocale"));
View Full Code Here

        Resource resource = new ClasspathResource(new DefaultClassResolver(), "/org/apache/tapestry/junit/Application.application");
        ILibrarySpecification pspec = new LibrarySpecification();
        pspec.setSpecificationLocation(resource);

        INamespace parentNamespace = new Namespace(null, null, pspec, null);
        INamespace namespace = new Namespace(null, parentNamespace, newLibrarySpec(), null);

        page.setNamespace(namespace);

        return source.getMessages(page);
    }
View Full Code Here

    }

    public synchronized INamespace getApplicationNamespace()
    {
        if (_applicationNamespace == null)
            _applicationNamespace = new Namespace(null, null, _specification, _namespaceResources);

        return _applicationNamespace;
    }
View Full Code Here

            Resource resource = new ClasspathResource(_classResolver,
                    "/org/apache/tapestry/Framework.library");

            ILibrarySpecification ls = getLibrarySpecification(resource);

            _frameworkNamespace = new Namespace(INamespace.FRAMEWORK_NAMESPACE, null, ls,
                    _namespaceResources);
        }

        return _frameworkNamespace;
    }
View Full Code Here

        IComponentSpecification spec = newSpec(location);
        spec.setLocation(_locationFixture);

        IPage page = newPage(spec, source, locale);

        INamespace namespace = new Namespace(null, null, newLibrarySpec(), null);

        page.setNamespace(namespace);

        return source.getMessages(page);
    }
View Full Code Here

        source.setComponentPropertySource(new NullComponentPropertySource());

        IComponentSpecification spec = newSpec(MOCK1);
        spec.setLocation(_locationFixture);

        INamespace namespace = new Namespace(null, null, newLibrarySpec(), null);

        IPage page = newPage(spec, source, new Locale("fr"));
        page.setNamespace(namespace);

        assertEquals("multilocale_fr", source.getMessages(page).getMessage("multilocale"));
View Full Code Here

TOP

Related Classes of org.apache.tapestry.engine.Namespace

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.