Examples of IComponentSpecification


Examples of org.apache.tapestry.spec.IComponentSpecification

    private void beginComponentSpecificationInitial()
    {
        expectElement("component-specification");

        IComponentSpecification cs = _factory.createComponentSpecification();

        cs.setAllowBody(getBooleanAttribute("allow-body", true));
        cs.setAllowInformalParameters(getBooleanAttribute("allow-informal-parameters", true));
        cs.setDeprecated(getBooleanAttribute("deprecated", false));

        String className = getAttribute("class");

        if (className != null)
            cs.setComponentClassName(className);

        cs.setSpecificationLocation(getResource());

        _rootObject = cs;

        push(_elementName, cs, STATE_COMPONENT_SPECIFICATION);
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IComponentSpecification

    }

    private void connectInformalBinding(IComponent container,
            IComponent component, String bindingName)
    {
        IComponentSpecification componentSpec = component.getSpecification();
        IComponentSpecification containerSpec = container.getSpecification();

        // check if binding already exists in the component
        if (component.getBinding(bindingName) != null) return;

        // check if parameter is informal for the component
        if (componentSpec.getParameter(bindingName) != null
                || componentSpec.isReservedParameterName(bindingName)) return;

        // check if parameter is informal for the container
        if (containerSpec.getParameter(bindingName) != null
                || containerSpec.isReservedParameterName(bindingName)) return;

        // if everything passes, establish binding
        IBinding binding = container.getBinding(bindingName);
        component.setBinding(bindingName, binding);
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IComponentSpecification

    /**
     * @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);

            if (parameterSpec.isRequired() && component.getBinding(name) == null)
                throw new ApplicationRuntimeException(
                    PageloadMessages.requiredParameterNotBound(name, component),
                    component,
View Full Code Here

Examples of org.apache.tapestry.spec.IComponentSpecification

        }

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

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

        setSpecification(specification);
View Full Code Here

Examples of org.apache.tapestry.spec.IComponentSpecification

            _log.debug(ResolverMessages.foundHTMLTemplate(resource));

        // TODO The SpecFactory in Specification parser should be used in some way to
        // create an IComponentSpecification!

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

        setSpecification(specification);

        install();
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IComponentSpecification

    }

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

        if (_log.isDebugEnabled())
            _log.debug(ResolverMessages.installingPage(_simpleName, namespace, specification));

        namespace.installPageSpecification(_simpleName, specification);
View Full Code Here

Examples of org.apache.tapestry.spec.IComponentSpecification

            resolve(cycle, containerNamespace, libraryId, simpleType, location);
        }
        else
            resolve(cycle, containerNamespace, null, type, location);

        IComponentSpecification spec = getSpecification();

        if (spec.isDeprecated())
            _log.warn(ResolverMessages.componentIsDeprecated(type, location));
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IComponentSpecification

        {
            setSpecification(namespace.getComponentSpecification(type));
            return;
        }

        IComponentSpecification spec = searchForComponent(cycle);

        // If not found after search, check to see if it's in
        // the framework instead.

        if (spec == null)
View Full Code Here

Examples of org.apache.tapestry.spec.IComponentSpecification

    // Hm. This could maybe go elsewhere, say onto ISpecificationSource

    private IComponentSpecification searchForComponent(IRequestCycle cycle)
    {
        IComponentSpecification result = null;
        INamespace namespace = getNamespace();

        if (_log.isDebugEnabled())
            _log.debug(ResolverMessages.resolvingComponent(_type, namespace));
View Full Code Here

Examples of org.apache.tapestry.spec.IComponentSpecification

        Class componentClass = _classFinder.findClass(packages, className);

        if (componentClass == null)
            return null;

        IComponentSpecification spec = new ComponentSpecification();

        Resource namespaceResource = namespace.getSpecificationLocation();

        Resource componentResource = namespaceResource.getRelativeResource(type + ".jwc");

        Location location = new LocationImpl(componentResource);

        spec.setLocation(location);
        spec.setSpecificationLocation(componentResource);
        spec.setComponentClassName(componentClass.getName());

        return spec;
    }
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.