Package com.ponysdk.ui.server.form.validator

Examples of com.ponysdk.ui.server.form.validator.NotEmptyFieldValidator


        createPonyActivity = new FormActivity(new DefaultFormView("Create a Pony"));
        nameFormField = new FormField(new TextBoxFormFieldRenderer("Name"));
        ageFormField = new FormField(new TextBoxFormFieldRenderer("Age"));
        raceFormField = new FormField(new TextBoxFormFieldRenderer("Race"));

        nameFormField.addValidator(new NotEmptyFieldValidator());
        raceFormField.addValidator(new NotEmptyFieldValidator());
        ageFormField.addValidator(new NotEmptyFieldValidator());
        ageFormField.addValidator(new IntegerFieldValidator());

        createPonyActivity.addFormField(nameFormField);
        createPonyActivity.addFormField(ageFormField);
        createPonyActivity.addFormField(raceFormField);
View Full Code Here


        formConfiguration.setName("Form");
        final FormActivity formActivity = new FormActivity(formConfiguration, formView);

        final FormField field1 = new FormField("field1");
        formActivity.addFormField(field1);
        field1.addValidator(new NotEmptyFieldValidator());
        field1.addValidator(new DoubleFieldValidator());

        final FormFieldRenderer field2Renderer = new TextBoxFormFieldRenderer("field2");
        final FormField field2 = new FormField(field2Renderer);
        formActivity.addFormField(field2);
View Full Code Here

    @Override
    public void start(final PAcceptsOneWidget world) {
        super.start(world);
        captionFormField = new FormField("Caption");
        captionFormField.addValidator(new NotEmptyFieldValidator());
        addFormField(captionFormField);
        addHandlerToFormField(captionFormField);

        fieldPathFormField = new FormField("Field Path");
        fieldPathFormField.addValidator(new NotEmptyFieldValidator());
        addFormField(fieldPathFormField);
        addHandlerToFormField(fieldPathFormField);

        final ListBoxFormFieldRenderer typeRenderer = new ListBoxFormFieldRenderer("Field Type");
        typeRenderer.addItem(String.class.getSimpleName(), String.class);
        typeRenderer.addItem(Integer.class.getSimpleName(), Integer.class);
        typeRenderer.addItem(Long.class.getSimpleName(), Long.class);
        typeRenderer.addItem(Double.class.getSimpleName(), Double.class);
        typeRenderer.addItem(Date.class.getSimpleName(), Date.class);
        typeRenderer.addItem(Boolean.class.getSimpleName(), Boolean.class);
        fieldTypeFormField = new FormField(typeRenderer);
        fieldTypeFormField.addValidator(new NotEmptyFieldValidator());
        addFormField(fieldTypeFormField);
        addHandlerToFormField(fieldTypeFormField);

    }
View Full Code Here

TOP

Related Classes of com.ponysdk.ui.server.form.validator.NotEmptyFieldValidator

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.