Package org.apache.click.examples.control

Examples of org.apache.click.examples.control.FieldSeparator


        addControl(newForm);
        addControl(classicForm);

        newForm.setLabelAlign(Form.ALIGN_RIGHT);
        newForm.setButtonAlign(Form.ALIGN_RIGHT);
        FieldSeparator contactSeparator = new FieldSeparator("contactDetails");
        newForm.add(contactSeparator); // unlike the FieldSet, we just add the separator to the Form
        TextField name = new TextField("name", "Name", 30);
        newForm.add(name); // without adding the fields to it.
        EmailField email = new EmailField("email");
        newForm.add(email);

        FieldSeparator feedbackSeparator = new FieldSeparator("feedbackDetails");
        newForm.add(feedbackSeparator);
        TextArea comment = new TextArea("Comment");
        newForm.add(comment);

        Checkbox inform = new Checkbox("inform","Yes, I agree!");
        newForm.add(inform);

        // Separator without a "legend": much like a HR element but with a consistent style with the other separators.
        FieldSeparator separator = new FieldSeparator("separator","");
        newForm.add(separator);

        newForm.add(new Submit("ok", "  OK  ",  this, "onOkClick1"));
        newForm.add(new PageSubmit("cancel", HomePage.class));
    }
View Full Code Here


    }

    private void makeSeparatorForm() {
        newForm.setLabelAlign(Form.ALIGN_RIGHT);
        newForm.setButtonAlign(Form.ALIGN_RIGHT);
        FieldSeparator contactSeparator = new FieldSeparator("contactDetails");
        newForm.add(contactSeparator); // unlike the FieldSet, we just add the separator to the Form
        TextField name = new TextField("name", "Name", 30);
        newForm.add(name); // without adding the fields to it.
        EmailField email = new EmailField("email");
        newForm.add(email);

        FieldSeparator feedbackSeparator = new FieldSeparator("feedbackDetails");
        newForm.add(feedbackSeparator);
        TextArea comment = new TextArea("Comment");
        newForm.add(comment);

        Checkbox inform = new Checkbox("inform","Yes, I agree!");
        newForm.add(inform);

        // Separator without a "legend": much like a HR element but with a consistent style with the other separators.
        FieldSeparator separator = new FieldSeparator("separator","");
        newForm.add(separator);

        newForm.add(new Submit("ok", "  OK  ",  this, "onOkClick1"));
        newForm.add(new PageSubmit("cancel", HomePage.class));
    }
View Full Code Here

TOP

Related Classes of org.apache.click.examples.control.FieldSeparator

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.