Package org.apache.tapestry5

Examples of org.apache.tapestry5.Binding


    public void is_invariant()
    {
        Page page = newPage(PAGE_NAME);
        Component component = mockComponent();
        ComponentModel model = mockComponentModel();
        Binding binding = mockBinding();
        TypeCoercer coercer = mockTypeCoercer();
        ParameterModel pmodel = mockParameterModel();
        Logger logger = mockLogger();

        train_getLogger(model, logger);
View Full Code Here


    public void read_binding()
    {
        Page page = newPage(PAGE_NAME);
        Component component = mockComponent();
        ComponentModel model = mockComponentModel();
        Binding binding = mockBinding();
        PageResources resources = mockPageResources();
        Logger logger = mockLogger();

        train_getLogger(model, logger);
View Full Code Here

    {
        Page page = newPage(PAGE_NAME);
        Component component = mockComponent();
        ComponentModel model = mockComponentModel();
        PageResources resources = mockPageResources();
        Binding binding = mockBinding();
        Logger logger = mockLogger();

        train_getLogger(model, logger);

        Instantiator ins = newInstantiator(component, model);

        train_getParameterModel(model, "barney", null);

        train_getSupportsInformalParameters(model, true);

        expect(binding.getBindingType()).andReturn(Integer.class);

        train_coerce(resources, 23, Integer.class, 23);

        binding.set(23);

        replay();

        ComponentPageElement cpe = new ComponentPageElementImpl(page, ins, resources);
View Full Code Here

        Component component = mockComponent();
        ComponentModel model = mockComponentModel();
        ComponentModel mixinModel = mockComponentModel();
        Component mixin = mockComponent();
        TypeCoercer coercer = mockTypeCoercer();
        Binding binding = mockBinding();
        Logger logger = mockLogger();

        train_getLogger(model, logger);

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

    @Test
    public void parameter_with_default() throws Exception
    {
        final BindingSource source = mockBindingSource();
        final InternalComponentResources resources = mockInternalComponentResources();
        final Binding binding = mockBinding();
        String boundValue = "howdy!";
        final Logger logger = mockLogger();

        MutableComponentModel model = mockMutableComponentModel(logger);
View Full Code Here

    public void parameter_is_bound()
    {
        Page page = newPage(PAGE_NAME);
        Component component = mockComponent();
        ComponentModel model = mockComponentModel();
        Binding binding = mockBinding();
        TypeCoercer coercer = mockTypeCoercer();
        Logger logger = mockLogger();

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

    public void verify_required_parameters_all_are_bound()
    {
        Page page = newPage(PAGE_NAME);
        Component component = mockComponent();
        ComponentModel model = mockComponentModel();
        Binding binding = mockBinding();
        TypeCoercer coercer = mockTypeCoercer();
        ParameterModel pmodel = mockParameterModel();
        Logger logger = mockLogger();

        train_getLogger(model, logger);
View Full Code Here

    {
        if (value == null) return;

        if (value instanceof Binding)
        {
            Binding binding = (Binding) value;

            resources.bindParameter(parameterName, binding);
            return;
        }
View Full Code Here

                BlockImpl block = new BlockImpl(token.getLocation(),
                                                interner.format("Parameter %s of %s",
                                                                parameterName,
                                                                element.getCompleteId()));

                Binding binding = new LiteralBinding(token.getLocation(), "block parameter " + parameterName, block);

                EmbeddedComponentAssembler embeddedAssembler = pageAssembly.embeddedAssembler.peek();

                ParameterBinder binder = embeddedAssembler.createParameterBinder(parameterName);
View Full Code Here

        for (String name : informals.keySet())
        {
            if (model.getParameterModel(name) != null) continue;

            Binding binding = informals.get(name);

            embedded.bindParameter(name, binding);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.Binding

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.