Examples of IComponentSpecification


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(
                    Tapestry.format(
                        "PageLoader.required-parameter-not-bound",
View Full Code Here

Examples of org.apache.tapestry.spec.IComponentSpecification

        IComponent objParent = getContainer();
        if (objParent == null)
            return;

        IComponentSpecification specification = objParent.getSpecification();
        Map bindings = objParent.getBindings();
        if (bindings == null)
            return;

        Iterator i = bindings.entrySet().iterator();

        while (i.hasNext())
        {
            Map.Entry entry = (Map.Entry) i.next();
            String name = (String) entry.getKey();

            // Skip over formal parameters stored in the bindings
            // Map.  We're just interested in informal parameters.

            if (specification.getParameter(name) != null)
                continue;

            IBinding binding = (IBinding) entry.getValue();

            Object value = binding.getObject();
View Full Code Here

Examples of org.apache.tapestry.spec.IComponentSpecification

*/
public abstract class BaseEnhancementTestCase extends HiveMindTestCase
{
    public IComponentSpecification newSpec(Location location)
    {
        IComponentSpecification spec = newSpec();

        spec.getLocation();
        setReturnValue(spec, location);

        return spec;
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IComponentSpecification

     */

    void bind(IComponent container, IComponent component, IContainedComponent contained,
            String defaultBindingPrefix)
    {
        IComponentSpecification spec = component.getSpecification();
        boolean formalOnly = !spec.getAllowInformalParameters();

        if (contained.getInheritInformalParameters())
        {
            if (formalOnly)
                throw new ApplicationRuntimeException(PageloadMessages
                        .inheritInformalInvalidComponentFormalOnly(component), component, contained
                        .getLocation(), null);

            IComponentSpecification containerSpec = container.getSpecification();

            if (!containerSpec.getAllowInformalParameters())
                throw new ApplicationRuntimeException(PageloadMessages
                        .inheritInformalInvalidContainerFormalOnly(container, component),
                        component, contained.getLocation(), null);

            IQueuedInheritedBinding queued = new QueuedInheritInformalBindings(component);
View Full Code Here

Examples of org.apache.tapestry.spec.IComponentSpecification

                String type = contained.getType();
                Location location = contained.getLocation();

                _componentResolver.resolve(cycle, namespace, type, location);

                IComponentSpecification componentSpecification = _componentResolver
                        .getSpecification();
                INamespace componentNamespace = _componentResolver.getNamespace();

                // Instantiate the contained component.
View Full Code Here

Examples of org.apache.tapestry.spec.IComponentSpecification

        IPage page = container.getPage();

        _componentResolver.resolve(cycle, container.getNamespace(), componentType, location);

        INamespace componentNamespace = _componentResolver.getNamespace();
        IComponentSpecification spec = _componentResolver.getSpecification();

        IContainedComponent contained = new ContainedComponent();
        contained.setLocation(location);
        contained.setType(componentType);
View Full Code Here

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

Examples of org.apache.tapestry.spec.IComponentSpecification

        return result;
    }

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

        if (result == null)
        {
            result = locateComponentSpecification(alias);
View Full Code Here

Examples of org.apache.tapestry.spec.IComponentSpecification

            throw new IllegalArgumentException(ScriptMessages.wrongTypeForEnhancement(inputClass));

        EnhancementOperationImpl op = new EnhancementOperationImpl(_classResolver,
                new ComponentSpecification(), inputClass, _classFactory, null);

        IComponentSpecification spec = new ComponentSpecification();
        spec.setLocation(_creatorLocation);

        Iterator i = _workers.iterator();
        while (i.hasNext())
        {
            EnhancementWorker worker = (EnhancementWorker) i.next();
View Full Code Here

Examples of org.apache.tapestry.spec.IComponentSpecification

        Collection names = source.getBindingNames();

        if (names == null)
            return;

        IComponentSpecification specification = source.getSpecification();
        Iterator i = names.iterator();

        while (i.hasNext())
        {
            String name = (String) i.next();

            // If not a formal parameter, then copy it over.

            if (specification.getParameter(name) == null)
            {
                IBinding binding = source.getBinding(name);

                destination.setBinding(name, binding);
            }
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.