Package org.apache.tapestry.spec

Examples of org.apache.tapestry.spec.IBindingSpecification


    private void enterMessageBinding()
    {try { __CLOVER_225_0.M[1148]++;
        __CLOVER_225_0.S[5389]++;String name = getAttribute("name");
        __CLOVER_225_0.S[5390]++;String key = getAttribute("key");

        __CLOVER_225_0.S[5391]++;IBindingSpecification bs = _factory.createBindingSpecification();
        __CLOVER_225_0.S[5392]++;bs.setType(BindingType.PREFIXED);
        __CLOVER_225_0.S[5393]++;bs.setValue("message:" + key);
        __CLOVER_225_0.S[5394]++;bs.setLocation(getLocation());

        __CLOVER_225_0.S[5395]++;IContainedComponent cc = (IContainedComponent) peekObject();

        __CLOVER_225_0.S[5396]++;cc.setBinding(name, bs);
View Full Code Here


        __CLOVER_225_0.S[13103]++;Iterator i = source.getBindingNames().iterator();
        __CLOVER_225_0.S[13104]++;while ((((i.hasNext()) && (++__CLOVER_225_0.CT[2230] != 0)) || (++__CLOVER_225_0.CF[2230] == 0))){
        {
            __CLOVER_225_0.S[13105]++;String bindingName = (String) i.next();
            __CLOVER_225_0.S[13106]++;IBindingSpecification binding = source.getBinding(bindingName);
            __CLOVER_225_0.S[13107]++;target.setBinding(bindingName, binding);
        }}

        __CLOVER_225_0.S[13108]++;target.setType(source.getType());
    } finally { }}
View Full Code Here

    {try { __CLOVER_225_0.M[3128]++;
        __CLOVER_225_0.S[13133]++;BindingSetter bs = (BindingSetter) peekObject();

        __CLOVER_225_0.S[13134]++;String expression = getExtendedValue(bs.getValue(), "expression", true);

        __CLOVER_225_0.S[13135]++;IBindingSpecification spec = _factory.createBindingSpecification();

        __CLOVER_225_0.S[13136]++;spec.setType(BindingType.PREFIXED);
        __CLOVER_225_0.S[13137]++;spec.setValue("ognl:" + expression);

        __CLOVER_225_0.S[13138]++;bs.apply(spec);
    } finally { }}
View Full Code Here

    {try { __CLOVER_225_0.M[3136]++;
        __CLOVER_225_0.S[13164]++;BindingSetter bs = (BindingSetter) peekObject();

        __CLOVER_225_0.S[13165]++;String literalValue = getExtendedValue(bs.getValue(), "value", true);

        __CLOVER_225_0.S[13166]++;IBindingSpecification spec = _factory.createBindingSpecification();

        __CLOVER_225_0.S[13167]++;spec.setType(BindingType.PREFIXED);
        __CLOVER_225_0.S[13168]++;spec.setValue("literal:" + literalValue);

        __CLOVER_225_0.S[13169]++;bs.apply(spec);
    } finally { }}
View Full Code Here

    {try { __CLOVER_225_0.M[3140]++;
        __CLOVER_225_0.S[13195]++;BindingSetter bs = (BindingSetter) peekObject();

        __CLOVER_225_0.S[13196]++;String value = getExtendedValue(bs.getValue(), "value", true);

        __CLOVER_225_0.S[13197]++;IBindingSpecification spec = _factory.createBindingSpecification();

        __CLOVER_225_0.S[13198]++;spec.setType(BindingType.PREFIXED);
        __CLOVER_225_0.S[13199]++;spec.setValue(value);

        __CLOVER_225_0.S[13200]++;bs.apply(spec);
    } finally { }}
View Full Code Here

    private void enterInheritedBinding()
    {try { __CLOVER_225_0.M[3149]++;
        __CLOVER_225_0.S[13247]++;String name = getAttribute("name");
        __CLOVER_225_0.S[13248]++;String parameterName = getAttribute("parameter-name");

        __CLOVER_225_0.S[13249]++;IBindingSpecification bs = _factory.createBindingSpecification();
        __CLOVER_225_0.S[13250]++;bs.setType(BindingType.INHERITED);
        __CLOVER_225_0.S[13251]++;bs.setValue(parameterName);

        __CLOVER_225_0.S[13252]++;IContainedComponent cc = (IContainedComponent) peekObject();

        __CLOVER_225_0.S[13253]++;cc.setBinding(name, bs);
View Full Code Here

    private void enterMessageBinding()
    {try { __CLOVER_225_0.M[3152]++;
        __CLOVER_225_0.S[13267]++;String name = getAttribute("name");
        __CLOVER_225_0.S[13268]++;String key = getAttribute("key");

        __CLOVER_225_0.S[13269]++;IBindingSpecification bs = _factory.createBindingSpecification();
        __CLOVER_225_0.S[13270]++;bs.setType(BindingType.PREFIXED);
        __CLOVER_225_0.S[13271]++;bs.setValue("message:" + key);
        __CLOVER_225_0.S[13272]++;bs.setLocation(getLocation());

        __CLOVER_225_0.S[13273]++;IContainedComponent cc = (IContainedComponent) peekObject();

        __CLOVER_225_0.S[13274]++;cc.setBinding(name, bs);
View Full Code Here

            boolean isFormal = pspec != null;

            String parameterName = isFormal ? pspec.getParameterName() : name;

            IBindingSpecification bspec = contained.getBinding(name);

            // If not allowing informal parameters, check that each binding
            // matches
            // a formal parameter.

            if (formalOnly && !isFormal)
                throw new ApplicationRuntimeException(PageloadMessages.formalParametersOnly(
                        component,
                        name), component, bspec.getLocation(), null);

            // If an informal parameter that conflicts with a reserved name,
            // then skip it.

            if (!isFormal && spec.isReservedParameterName(name))
                continue;

            if (isFormal)
            {
                if (!name.equals(parameterName))
                {
                    _log.error(PageloadMessages.usedParameterAlias(
                            contained,
                            name,
                            parameterName,
                            bspec.getLocation()));
                }
                else if (pspec.isDeprecated())
                    _log.error(PageloadMessages.deprecatedParameter(
                            name,
                            bspec.getLocation(),
                            contained.getType()));
            }

            // The type determines how to interpret the value:
            // As a simple static String
            // As a nested property name (relative to the component)
            // As the name of a binding inherited from the containing component.
            // As the name of a public field
            // As a script for a listener

            BindingType type = bspec.getType();

            // For inherited bindings, defer until later. This gives components
            // a chance to setup bindings from static values and expressions in
            // the template. The order of operations is tricky, template bindings
            // come later. Note that this is a hold over from the Tapestry 3.0 DTD
            // and will some day no longer be supported.

            if (type == BindingType.INHERITED)
            {
                QueuedInheritedBinding queued = new QueuedInheritedBinding(component, bspec
                        .getValue(), parameterName);
                _inheritedBindingQueue.add(queued);
                continue;
            }
View Full Code Here

        Iterator i = source.getBindingNames().iterator();
        while (i.hasNext())
        {
            String bindingName = (String) i.next();
            IBindingSpecification binding = source.getBinding(bindingName);
            target.setBinding(bindingName, binding);
        }

        target.setType(source.getType());
    }
View Full Code Here

    {
        BindingSetter bs = (BindingSetter) peekObject();

        String expression = getExtendedValue(bs.getValue(), "expression", true);

        IBindingSpecification spec = _factory.createBindingSpecification();

        spec.setType(BindingType.PREFIXED);
        spec.setValue(BindingConstants.OGNL_PREFIX + ":" + expression);

        bs.apply(spec);
    }
View Full Code Here

TOP

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

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.