Package org.apache.tapestry.model

Examples of org.apache.tapestry.model.ParameterModel


        Page page = newPage(PAGE_NAME);
        Component component = newComponent();
        ComponentModel model = newComponentModel();
        Binding binding = newBinding();
        TypeCoercer coercer = newTypeCoercer();
        ParameterModel pmodel = newParameterModel();

        Instantiator ins = newInstantiator(component, model);

        train_getParameterNames(model, "barney");
        train_getParameterModel(model, "barney", pmodel);
View Full Code Here


    public void verify_required_parameters_unbound_but_not_required()
    {
        Page page = newPage(PAGE_NAME);
        Component component = newComponent();
        ComponentModel model = newComponentModel();
        ParameterModel pmodel = newParameterModel();
        TypeCoercer coercer = newTypeCoercer();

        Instantiator ins = newInstantiator(component, model);

        train_getParameterNames(model, "barney");
View Full Code Here

        Page page = newPage();
        ComponentPageElement container = newComponentPageElement();
        InternalComponentResources containerResources = newInternalComponentResources();
        Component component = newComponent();
        ComponentModel model = newComponentModel();
        ParameterModel pmodel = newParameterModel();
        Location l = newLocation();
        TypeCoercer coercer = newTypeCoercer();

        Instantiator ins = newInstantiator(component, model);
View Full Code Here

        Page page = newPage(PAGE_NAME);
        Component component = newComponent();
        ComponentModel model = newComponentModel();
        Binding binding = newBinding();
        TypeCoercer coercer = newTypeCoercer();
        ParameterModel pmodel = newParameterModel();

        Instantiator ins = newInstantiator(component, model);

        train_getParameterModel(model, "barney", pmodel);
View Full Code Here

        Component component = newComponent();
        Instantiator ins = newInstantiator(component);
        MarkupWriter writer = newMarkupWriter();
        TypeCoercer coercer = newTypeCoercer();
        ComponentModel model = newComponentModel();
        ParameterModel pmodel = newParameterModel();
        Binding binding = newBinding();

        train_getModel(ins, model);

        train_getParameterModel(model, "fred", pmodel);
View Full Code Here

        _parameters.put(name, new ParameterModelImpl(name, required, defaultBindingPrefix));
    }

    public ParameterModel getParameterModel(String parameterName)
    {
        ParameterModel result = InternalUtils.get(_parameters, parameterName.toLowerCase());

        if (result == null && _parentModel != null)
            result = _parentModel.getParameterModel(parameterName);

        return result;
View Full Code Here

        for (String name : model.getParameterNames())
        {
            if (resource.isBound(name)) continue;

            ParameterModel parameterModel = model.getParameterModel(name);

            if (parameterModel.isRequired())
            {
                String fullName = prefix == null ? name : prefix + "." + name;

                unbound.add(fullName);
            }
View Full Code Here

                        mixinName,
                        parameterName), null, null);

            String simpleName = parameterName.substring(dotx + 1);

            ParameterModel pm = mixinResources.getComponentModel().getParameterModel(simpleName);

            return pm != null ? pm.getDefaultBindingPrefix() : null;
        }

        // A formal parameter of the core component?

        ParameterModel pm = _coreResources.getComponentModel().getParameterModel(parameterName);

        if (pm != null) return pm.getDefaultBindingPrefix();

        // Search for mixin that it is a formal parameter of

        for (String mixinName : InternalUtils.sortedKeys(_mixinsByShortName))
        {
            InternalComponentResources resources = _mixinsByShortName.get(mixinName);

            pm = resources.getComponentModel().getParameterModel(parameterName);

            if (pm != null) return pm.getDefaultBindingPrefix();
        }

        // Not a formal parameter of the core component or any mixin.

        return null;
View Full Code Here

        for (String name : model.getParameterNames())
        {
            if (resource.isBound(name)) continue;

            ParameterModel parameterModel = model.getParameterModel(name);

            if (parameterModel.isRequired())
            {
                String fullName = prefix == null ? name : prefix + "." + name;

                unbound.add(fullName);
            }
View Full Code Here

            if (mixinResources == null) throw new TapestryException(
                    StructureMessages.missingMixinForParameter(_completeId, mixinName, parameterName), null, null);

            String simpleName = parameterName.substring(dotx + 1);

            ParameterModel pm = mixinResources.getComponentModel().getParameterModel(simpleName);

            return pm != null ? pm.getDefaultBindingPrefix() : null;
        }

        // A formal parameter of the core component?

        ParameterModel pm = _coreResources.getComponentModel().getParameterModel(parameterName);

        if (pm != null) return pm.getDefaultBindingPrefix();

        // Search for mixin that it is a formal parameter of

        for (String mixinName : InternalUtils.sortedKeys(_mixinsByShortName))
        {
            InternalComponentResources resources = _mixinsByShortName.get(mixinName);

            pm = resources.getComponentModel().getParameterModel(parameterName);

            if (pm != null) return pm.getDefaultBindingPrefix();
        }

        // Not a formal parameter of the core component or any mixin.

        return null;
View Full Code Here

TOP

Related Classes of org.apache.tapestry.model.ParameterModel

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.