Package org.gwtoolbox.widget.client.form.field

Examples of org.gwtoolbox.widget.client.form.field.ShortTextField


@FormSample
public class HtmlForm extends Composite implements SamplePanel {

    public HtmlForm() {

        ShortTextField toField = new ShortTextField("to", "To:");
        toField.setValidators(notNull(), notEmpty());

        ShortTextField subjectField = new ShortTextField("subject", "Subject:");
        subjectField.setValidators(notNull(), notEmpty());

        LongTextField bodyField = new LongTextField("body", "Body:");
        bodyField.setValidators(notNull(), notEmpty());

        final Form form = new Form();
View Full Code Here


@FormSample
public class SimpleForm extends Composite implements SamplePanel {

    public SimpleForm() {

        ShortTextField toField = new ShortTextField("to", "To:");
        toField.setValidators(notNull(), notEmpty());

        ShortTextField subjectField = new ShortTextField("subject", "Subject:");
        subjectField.setValidators(notNull(), notEmpty());

        LongTextField bodyField = new LongTextField("body", "Body:");
        bodyField.setValidators(notNull(), notEmpty());
       
        final Form form = new Form();
View Full Code Here

@FormSample
public class FieldSetForm extends Composite implements SamplePanel {

    public FieldSetForm() {

        ShortTextField firstNameField = new ShortTextField("firstName", "First Name");
        firstNameField.setValidators(notNull(), notEmpty());

        ShortTextField lastNameField = new ShortTextField("lastName", "Last Name");
        lastNameField.setValidators(notNull(), notEmpty());

        ShortTextField emailField = new ShortTextField("email", "Email");
        emailField.setValidators(notNull(), notEmpty(), email());

        ShortTextField street1Field = new ShortTextField("street1", "Street");
        street1Field.setValidators(notNull(), notEmpty());

        ShortTextField street2Field = new ShortTextField("street2", "Street");

        Map<Integer, String> cities = new LinkedHashMap<Integer, String>() {{
            put(1, "New York");
            put(2, "Amsterdam");
            put(3, "Tel-Aviv");
View Full Code Here

    public FormPanelSample() {

        Form form = new Form();
        form.addFields(
                new ShortTextField("firstName", "First Name"),
                new ShortTextField("lastName", "Last Name"),
                new IntegerField("age", "Age"),
                new ShortTextField("email", "Email").setValidators(Validators.email()),
                new ShortTextField("address.street", "Street"),
                new ShortTextField("address.city", "City"),
                new ShortTextField("address.country", "Country")
        );

        SimpleFormLayout layout = new SimpleFormLayout();
        layout.addGroup(new FieldGroup("Contact Details").setOptional(true).setKeys(
                "address.street", "address.city", "address.country"
View Full Code Here

TOP

Related Classes of org.gwtoolbox.widget.client.form.field.ShortTextField

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.