Package com.ponysdk.ui.server.form2.formfield

Examples of com.ponysdk.ui.server.form2.formfield.DateBoxFormField


        final PFlexTable panel = new PFlexTable();

        final Form form = new Form();

        final FormField<String> field1 = new StringTextBoxFormField();
        field1.setValidator(new NotEmptyFieldValidator());
        final FormField<String> field2 = new StringTextBoxFormField();
        field2.setValidator(new DoubleFieldValidator());
        final FormField<String> field3 = new StringTextBoxFormField();
        field3.setValidator(new CompositeFieldValidator(new NotEmptyFieldValidator(), new DoubleFieldValidator()));
        final FormField<String> field4 = new StringTextBoxFormField();
        field4.setValidator(new CompositeFieldValidator(new NotEmptyFieldValidator(), new EmailFieldValidator()));
        final FormField<Boolean> field5 = new CheckBoxFormField();
        field5.setValidator(new UncheckedFieldValidator());

        final PListBox listBox = new PListBox(true);
        listBox.addItem("Item 1");
        listBox.addItem("Item 2");
        listBox.addItem("Item 3");
        listBox.addItem("Item 4");
        listBox.addItem("Item 5");
        listBox.addItem("Item 6");

        final FormField<String> field6 = new StringListBoxFormField(listBox);
        field6.setValidator(new NotEmptyFieldValidator());

        final FormField<Date> field7 = new DateBoxFormField();
        field7.setValidator(new NotEmptyFieldValidator());

        final FormField<Date> field8 = new DateBoxFormField();
        field7.setValidator(new NotEmptyFieldValidator());

        final FormField<String> field9 = new StringTextBoxFormField();
        field9.setValidator(new NotEmptyFieldValidator());

        final FormField<String> field10 = new StringTextBoxFormField();
        field10.setValidator(new TwinFieldValidator("Field doesn't match", field9));

        form.addFormField(field1);
View Full Code Here


        final FormField<String> field9 = new StringTextBoxFormField();
        field9.setValidator(new NotEmptyFieldValidator());

        final FormField<String> field10 = new StringTextBoxFormField();
        field10.setValidator(new TwinFieldValidator("Field doesn't match", field9));

        form.addFormField(field1);
        form.addFormField(field2);
        form.addFormField(field3);
        form.addFormField(field4);
View Full Code Here

        final FormField<String> field3 = new StringTextBoxFormField();
        field3.setValidator(new CompositeFieldValidator(new NotEmptyFieldValidator(), new DoubleFieldValidator()));
        final FormField<String> field4 = new StringTextBoxFormField();
        field4.setValidator(new CompositeFieldValidator(new NotEmptyFieldValidator(), new EmailFieldValidator()));
        final FormField<Boolean> field5 = new CheckBoxFormField();
        field5.setValidator(new UncheckedFieldValidator());

        final PListBox listBox = new PListBox(true);
        listBox.addItem("Item 1");
        listBox.addItem("Item 2");
        listBox.addItem("Item 3");
View Full Code Here

    }

    public boolean isValid() {
        boolean valid = true;
        for (final FormField<?> formField : formFields) {
            final ValidationResult result = formField.isValid();
            if (!result.isValid()) {
                valid = false;
            }
        }
        return valid;
    }
View Full Code Here

        this.dataProvider = dataProvider;
    }

    @Override
    public ValidationResult isValid() {
        ValidationResult result;

        if (validator == null) result = ValidationResult.newOKValidationResult();
        else result = validator.isValid(getStringValue());

        fireAfterValidation(result);
View Full Code Here

TOP

Related Classes of com.ponysdk.ui.server.form2.formfield.DateBoxFormField

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.