Package org.apache.tapestry.model

Examples of org.apache.tapestry.model.MutableComponentModel.addParameter()


    private Component setupForIntegrationTest(final InternalComponentResources resources) throws Exception
    {
        MutableComponentModel model = mockMutableComponentModel();

        model.addParameter("invariantObject", false, TapestryConstants.PROP_BINDING_PREFIX);
        model.addParameter("invariantPrimitive", false, TapestryConstants.PROP_BINDING_PREFIX);
        model.addParameter("object", false, TapestryConstants.PROP_BINDING_PREFIX);
        model.addParameter("primitive", true, TapestryConstants.PROP_BINDING_PREFIX);
        model.addParameter("uncached", false, TapestryConstants.LITERAL_BINDING_PREFIX);

        final Logger logger = mockLogger();
View Full Code Here


    {
        MutableComponentModel model = mockMutableComponentModel();

        model.addParameter("invariantObject", false, TapestryConstants.PROP_BINDING_PREFIX);
        model.addParameter("invariantPrimitive", false, TapestryConstants.PROP_BINDING_PREFIX);
        model.addParameter("object", false, TapestryConstants.PROP_BINDING_PREFIX);
        model.addParameter("primitive", true, TapestryConstants.PROP_BINDING_PREFIX);
        model.addParameter("uncached", false, TapestryConstants.LITERAL_BINDING_PREFIX);

        final Logger logger = mockLogger();
View Full Code Here

        MutableComponentModel model = mockMutableComponentModel();

        model.addParameter("invariantObject", false, TapestryConstants.PROP_BINDING_PREFIX);
        model.addParameter("invariantPrimitive", false, TapestryConstants.PROP_BINDING_PREFIX);
        model.addParameter("object", false, TapestryConstants.PROP_BINDING_PREFIX);
        model.addParameter("primitive", true, TapestryConstants.PROP_BINDING_PREFIX);
        model.addParameter("uncached", false, TapestryConstants.LITERAL_BINDING_PREFIX);

        final Logger logger = mockLogger();

        Runnable phaseTwoTraining = new Runnable()
View Full Code Here

        model.addParameter("invariantObject", false, TapestryConstants.PROP_BINDING_PREFIX);
        model.addParameter("invariantPrimitive", false, TapestryConstants.PROP_BINDING_PREFIX);
        model.addParameter("object", false, TapestryConstants.PROP_BINDING_PREFIX);
        model.addParameter("primitive", true, TapestryConstants.PROP_BINDING_PREFIX);
        model.addParameter("uncached", false, TapestryConstants.LITERAL_BINDING_PREFIX);

        final Logger logger = mockLogger();

        Runnable phaseTwoTraining = new Runnable()
        {
View Full Code Here

        replay();

        MutableComponentModel model = new MutableComponentModelImpl(CLASS_NAME, log, r, null);

        model.addParameter("fred", true, TapestryConstants.PROP_BINDING_PREFIX);

        try
        {
            // This also helps check that the comparison is caseless!
           
View Full Code Here

        try
        {
            // This also helps check that the comparison is caseless!
           
            model.addParameter("Fred", true, TapestryConstants.PROP_BINDING_PREFIX);
            unreachable();
        }
        catch (IllegalArgumentException ex)
        {
            assertEquals(
View Full Code Here

        Log log = newLog();

        replay();

        MutableComponentModel model = new MutableComponentModelImpl(CLASS_NAME, log, r, null);
        model.addParameter("fred", true, TapestryConstants.PROP_BINDING_PREFIX);

        assertNull(model.getParameterModel("barney"));

        verify();
    }
View Full Code Here

        assertTrue(model.getParameterNames().isEmpty());

        String parameterName = "value";

        model.addParameter(parameterName, true, TapestryConstants.PROP_BINDING_PREFIX);

        ParameterModel pm = model.getParameterModel(parameterName);

        assertEquals(pm.getName(), parameterName);
        assertEquals(true, pm.isRequired());
View Full Code Here

        assertEquals(model.getDeclaredParameterNames(), Arrays.asList(parameterName));

        // Verify that the binding prefix is actually stored:

        model.addParameter("fred", true, "flint");

        // Checks that parameter names are case insensitive
       
        assertEquals(model.getParameterModel("Fred").getDefaultBindingPrefix(), "flint");
View Full Code Here

        replay();

        MutableComponentModel model = new MutableComponentModelImpl(CLASS_NAME, log, r, null);

        model.addParameter("fred", true, TapestryConstants.PROP_BINDING_PREFIX);
        model.addParameter("wilma", true, TapestryConstants.PROP_BINDING_PREFIX);
        model.addParameter("barney", true, TapestryConstants.PROP_BINDING_PREFIX);

        assertEquals(model.getDeclaredParameterNames(), Arrays.asList("barney", "fred", "wilma"));
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.