Package org.apache.tapestry.spec

Examples of org.apache.tapestry.spec.IComponentSpecification


        return _specification.getLibraryIds();
    }

    public IComponentSpecification getPageSpecification(String name)
    {
        IComponentSpecification result = (IComponentSpecification) _pages.get(name);

        if (result == null)
        {
            result = locatePageSpecification(name);
View Full Code Here


        return result;
    }

    public IComponentSpecification getComponentSpecification(String alias)
    {
        IComponentSpecification result = (IComponentSpecification) _components.get(alias);

        if (result == null)
        {
            result = locateComponentSpecification(alias);
            _components.put(alias, result);
View Full Code Here

    /**
     * @see org.apache.tapestry.pageload.IComponentVisitor#visitComponent(org.apache.tapestry.IComponent)
     */
    public void visitComponent(IComponent component)
    {
        IComponentSpecification spec = component.getSpecification();

        Iterator i = spec.getParameterNames().iterator();

        while(i.hasNext())
        {
            String name = (String) i.next();
            IParameterSpecification parameterSpec = spec.getParameter(name);

            // Skip aliases

            if (!name.equals(parameterSpec.getParameterName())) continue;

View Full Code Here

        }

        // Not found by any normal rule, so its time to
        // consult the delegate.

        IComponentSpecification specification = getDelegate()
                .findPageSpecification(cycle, namespace, _simpleName);

        if (specification != null)
        {
            setSpecification(specification);
View Full Code Here

        // searching for the page's message catalog or other related assets.

        Resource pageResource = namespaceLocation
                .getRelativeResource(_simpleName + ".page");

        IComponentSpecification specification = new ComponentSpecification();
        specification.setPageSpecification(true);
        specification.setSpecificationLocation(pageResource);
        specification.setLocation(new LocationImpl(resource));

        setSpecification(specification);

        install();
    }
View Full Code Here

    }

    private void install()
    {
        INamespace namespace = getNamespace();
        IComponentSpecification specification = getSpecification();

        if (_log.isDebugEnabled())
            _log.debug(ResolverMessages.installingPage(_simpleName, namespace,
                    specification));
View Full Code Here

    public String getComponentType()
    {
        IComponent container = _component.getContainer();

        IComponentSpecification containerSpecification = container.getSpecification();

        String id = _component.getId();
        IContainedComponent contained = containerSpecification.getComponent(id);

        // Temporary:  An implicit component will not be in the containing
        // component's specification as a ContainedComponent.

        if (contained == null)
View Full Code Here

     * Reads the template for the component.
     */

    public ComponentTemplate getTemplate(IRequestCycle cycle, IComponent component)
    {
        IComponentSpecification specification = component.getSpecification();
        Resource resource = specification.getSpecificationLocation();

        Locale locale = component.getPage().getLocale();

        Object key = new MultiKey(new Object[]
        { resource, locale }, false);
View Full Code Here

        return result;
    }

    private IPropertySource createSourceForComponent(IComponent component)
    {
        IComponentSpecification specification = component.getSpecification();

        List sources = new ArrayList();

        sources.add(new PropertyHolderPropertySource(specification));
        sources.add(getSourceForNamespace(component.getNamespace()));
View Full Code Here

        INamespace namespace = newNamespace("org.foo");

        MockControl crc = newControl(ClassResolver.class);
        ClassResolver cr = (ClassResolver) crc.getMock();

        IComponentSpecification spec = newSpec();

        cr.checkForClass("org.foo.bar.Baz");
        crc.setReturnValue(getClass());

        replayControls();
View Full Code Here

TOP

Related Classes of org.apache.tapestry.spec.IComponentSpecification

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.