Examples of IPropertySpecification


Examples of org.apache.tapestry.spec.IPropertySpecification

        IComponentSpecification spec = parsePage("Property.page");

        checkList("propertySpecificationNames", new String[]
        { "bool", "init", "longInit", "persist" }, spec.getPropertySpecificationNames());

        IPropertySpecification ps = spec.getPropertySpecification("bool");
        assertEquals("name", "bool", ps.getName());
        assertEquals("persistent", false, ps.isPersistent());

        // In a 4.0 DTD, type is always null.
        assertNull("type", ps.getType());

        // Note that no prefix is added. Initial value will be a string literal,
        // or have a prefix and be something else.

        assertNull("initialValue", ps.getInitialValue());
        checkLine(ps, 24);

        ps = spec.getPropertySpecification("init");
        assertEquals("name", "init", ps.getName());
        assertEquals("persistent", false, ps.isPersistent());

        assertEquals("initialValue", "ognl:pageName", ps.getInitialValue());
        checkLine(ps, 26);

        ps = spec.getPropertySpecification("persist");
        assertEquals("name", "persist", ps.getName());
        assertEquals("persistent", true, ps.isPersistent());
        assertNull("initialValue", ps.getInitialValue());
        checkLine(ps, 25);

        ps = spec.getPropertySpecification("longInit");
        assertEquals("message:long-init-key", ps.getInitialValue());

        ps = spec.getPropertySpecification("unknown");

        assertNull("Unknown PropertySpecification", ps);
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IPropertySpecification

        IComponentSpecification spec = parsePage("Property.page");

        checkList("propertySpecificationNames", new String[]
        { "bool", "init", "longInit", "persist" }, spec.getPropertySpecificationNames());

        IPropertySpecification ps = spec.getPropertySpecification("bool");
        assertEquals("name", "bool", ps.getName());
        assertEquals("persistent", false, ps.isPersistent());

        // In a 4.0 DTD, type is always null.
        assertNull("type", ps.getType());

        // Note that no prefix is added. Initial value will be a string literal,
        // or have a prefix and be something else.

        assertNull("initialValue", ps.getInitialValue());
        checkLine(ps, 24);

        ps = spec.getPropertySpecification("init");
        assertEquals("name", "init", ps.getName());
        assertEquals("persistent", false, ps.isPersistent());

        assertEquals("initialValue", "ognl:pageName", ps.getInitialValue());
        checkLine(ps, 26);

        ps = spec.getPropertySpecification("persist");
        assertEquals("name", "persist", ps.getName());
        assertEquals("persistent", true, ps.isPersistent());
        assertNull("initialValue", ps.getInitialValue());
        checkLine(ps, 25);

        ps = spec.getPropertySpecification("longInit");
        assertEquals("message:long-init-key", ps.getInitialValue());

        ps = spec.getPropertySpecification("unknown");

        assertNull("Unknown PropertySpecification", ps);
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IPropertySpecification

        new PersistAnnotationWorker().performEnhancement(op, spec, m, l);

        verifyControls();

        IPropertySpecification ps = spec.getPropertySpecification("clientPersistentProperty");

        assertEquals("client", ps.getPersistence());
        assertEquals("clientPersistentProperty", ps.getName());
        assertSame(l, ps.getLocation());
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IPropertySpecification

        Persist p = method.getAnnotation(Persist.class);

        String propertyName = AnnotationUtils.getPropertyName(method);
        String stategy = p.value();

        IPropertySpecification pspec = new PropertySpecification();

        pspec.setName(propertyName);
        pspec.setPersistence(stategy);
        pspec.setLocation(location);

        spec.addPropertySpecification(pspec);
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IPropertySpecification

        pvs.applyValue(finalValue);
    }

    private void endPropertySpecification()
    {
        IPropertySpecification ps = (IPropertySpecification) peekObject();

        String initialValue = getExtendedValue(ps.getInitialValue(), "initial-value", false);

        // In the 3.0 DTD, the initial value was always an OGNL expression.
        // In the 4.0 DTD, it is a binding reference, qualified with a prefix.

        if (initialValue != null && !_DTD_4_0)
            initialValue = BindingConstants.OGNL_PREFIX + ":" + initialValue;

        ps.setInitialValue(initialValue);
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IPropertySpecification

        else
            persistence = getBooleanAttribute("persistent", false) ? "session" : null;

        String initialValue = getAttribute("initial-value");

        IPropertySpecification ps = _factory.createPropertySpecification();
        ps.setName(name);

        if (HiveMind.isNonBlank(type))
            ps.setType(type);

        ps.setPersistence(persistence);
        ps.setInitialValue(initialValue);

        IComponentSpecification cs = (IComponentSpecification) peekObject();
        cs.addPropertySpecification(ps);

        push(_elementName, ps, STATE_PROPERTY, false);
View Full Code Here

Examples of org.apache.tapestry.spec.IPropertySpecification

        __CLOVER_194_0.S[12821]++;int count = names.size();

        __CLOVER_194_0.S[12822]++;for (int i = 0; (((i < count) && (++__CLOVER_194_0.CT[2183] != 0)) || (++__CLOVER_194_0.CF[2183] == 0)); i++){
        {
            __CLOVER_194_0.S[12823]++;String name = (String) names.get(i);
            __CLOVER_194_0.S[12824]++;IPropertySpecification ps = spec.getPropertySpecification(name);
            __CLOVER_194_0.S[12825]++;String expression = ps.getInitialValue();

            __CLOVER_194_0.S[12826]++;PageDetachListener initializer = new PropertyInitializer(component, name, expression,
                    ps.getLocation(), _expressionEvaluator);

            __CLOVER_194_0.S[12827]++;_propertyInitializers.add(initializer);
            __CLOVER_194_0.S[12828]++;page.addPageDetachListener(initializer);
        }}
View Full Code Here

Examples of org.apache.tapestry.spec.IPropertySpecification

        __CLOVER_225_0.S[11352]++;pvs.applyValue(finalValue);
    } finally { }}

    private void endPropertySpecification()
    {try { __CLOVER_225_0.M[2780]++;
        __CLOVER_225_0.S[11353]++;IPropertySpecification ps = (IPropertySpecification) peekObject();

        __CLOVER_225_0.S[11354]++;String initialValue = getExtendedValue(ps.getInitialValue(), "initial-value", false);

        __CLOVER_225_0.S[11355]++;ps.setInitialValue(initialValue);
    } finally { }}
View Full Code Here

Examples of org.apache.tapestry.spec.IPropertySpecification

        __CLOVER_225_0.S[11500]++;String name = getValidatedAttribute("name", PROPERTY_NAME_PATTERN, "invalid-property-name");
        __CLOVER_225_0.S[11501]++;String type = getAttribute("type");
        __CLOVER_225_0.S[11502]++;boolean persistent = getBooleanAttribute("persistent", false);
        __CLOVER_225_0.S[11503]++;String initialValue = getAttribute("initial-value");

        __CLOVER_225_0.S[11504]++;IPropertySpecification ps = _factory.createPropertySpecification();
        __CLOVER_225_0.S[11505]++;ps.setName(name);

        __CLOVER_225_0.S[11506]++;if ((((Tapestry.isNonBlank(type)) && (++__CLOVER_225_0.CT[1971] != 0)) || (++__CLOVER_225_0.CF[1971] == 0))){
            __CLOVER_225_0.S[11507]++;ps.setType(type);}

        __CLOVER_225_0.S[11508]++;ps.setPersistent(persistent);
        __CLOVER_225_0.S[11509]++;ps.setInitialValue(initialValue);

        __CLOVER_225_0.S[11510]++;IComponentSpecification cs = (IComponentSpecification) peekObject();
        __CLOVER_225_0.S[11511]++;cs.addPropertySpecification(ps);

        __CLOVER_225_0.S[11512]++;push(_elementName, ps, STATE_PROPERTY_SPECIFICATION, false);
View Full Code Here

Examples of org.apache.tapestry.spec.IPropertySpecification

        __CLOVER_225_0.S[5279]++;pvs.applyValue(finalValue);
    } finally { }}

    private void endPropertySpecification()
    {try { __CLOVER_225_0.M[1130]++;
        __CLOVER_225_0.S[5280]++;IPropertySpecification ps = (IPropertySpecification) peekObject();

        __CLOVER_225_0.S[5281]++;String initialValue = getExtendedValue(ps.getInitialValue(), "initial-value", false);

        __CLOVER_225_0.S[5282]++;ps.setInitialValue(initialValue);
    } finally { }}
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.