Package org.apache.tapestry.form

Examples of org.apache.tapestry.form.IFormComponent


        verifyControls();
    }

    public void testOverrideMinimumLengthMessage()
    {
        IFormComponent field = newField("short");

        replayControls();

        v.setMinimumLength(20);
        v.setMinimumLengthMessage("E-mail addresses must be at least 20 characters.");
View Full Code Here


        assertEquals("Result.", "08.12.01", out);
    }

    public void testToObjectNull() throws ValidatorException
    {
        IFormComponent field = newField();

        replayControls();

        Object out = v.toObject(field, null);
View Full Code Here

        verifyControls();
    }

    public void testToObjectEmpty() throws ValidatorException
    {
        IFormComponent field = newField();

        replayControls();

        Object out = v.toObject(field, "");
View Full Code Here

        verifyControls();
    }

    public void testToObjectInvalid()
    {
        IFormComponent field = newField("badDatesIndy");

        replayControls();

        try
        {
View Full Code Here

    }

    public void testOverrideInvalidDateFormatMessage()
    {

        IFormComponent field = newField("badDatesIndy");

        replayControls();

        v.setInvalidDateFormatMessage("Enter a valid date for {0}.");
View Full Code Here

        assertEquals("Result.", buildDate(Calendar.DECEMBER, 8, 2001), out);
    }

    public void testToObjectMinimum()
    {
        IFormComponent field = newField("toObjectMinimum", Locale.ENGLISH);

        replayControls();

        v.setMinimum(buildDate(Calendar.DECEMBER, 24, 2001));
View Full Code Here

        verifyControls();
    }

    public void testOverrideDateTooEarlyMessage()
    {
        IFormComponent field = newField("inputDate", Locale.ENGLISH);

        replayControls();

        v.setMinimum(buildDate(Calendar.DECEMBER, 24, 2001));
        v.setDateTooEarlyMessage("Provide a date for {0} after Dec 24 2001.");
View Full Code Here

        assertNull(out);
    }

    public void testToObjectMaximum()
    {
        IFormComponent field = newField("toObjectMaximum");

        replayControls();

        v.setMaximum(buildDate(Calendar.DECEMBER, 24, 2001));
View Full Code Here

        verifyControls();
    }

    public void testOverrideDateTooLateMessage()
    {
        IFormComponent field = newField("toObjectMaximum");

        replayControls();

        v.setMaximum(buildDate(Calendar.DECEMBER, 24, 2001));
        v.setDateTooLateMessage("Try again with a date before Dec 24 2001 in {0}.");
View Full Code Here

        assertEquals(input, result);
    }

    public void testFulfillingPatterns() throws ValidatorException
    {
        IFormComponent field = newField();

        pv.setPatternString("foo|foot");
        positiveTest(field, "xfooty");

        pv.setPatternString("^(\\d{5}(-\\d{4})?)$");
View Full Code Here

TOP

Related Classes of org.apache.tapestry.form.IFormComponent

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.