Package org.apache.click.control

Examples of org.apache.click.control.TextField


                }

                int maxlength = dbAttribute.getMaxLength();
                if (maxlength != -1) {
                    if (field instanceof TextField) {
                        TextField textField = (TextField) field;
                        if (textField.getMaxLength() == 0) {
                            textField.setMaxLength(maxlength);
                        }
                    } else if (field instanceof TextArea) {
                        TextArea textArea = (TextArea) field;
                        if (textArea.getMaxLength() == 0) {
                            textArea.setMaxLength(maxlength);
View Full Code Here


                }

                int maxlength = dbAttribute.getMaxLength();
                if (maxlength != -1) {
                    if (field instanceof TextField) {
                        TextField textField = (TextField) field;
                        if (textField.getMaxLength() == 0) {
                            textField.setMaxLength(maxlength);
                        }
                    } else if (field instanceof TextArea) {
                        TextArea textArea = (TextArea) field;
                        if (textArea.getMaxLength() == 0) {
                            textArea.setMaxLength(maxlength);
View Full Code Here

        addControl(form);

        FieldSet fieldSet = new FieldSet("Customer");
        form.add(fieldSet);

        TextField nameField = new TextField("name", true);
        nameField.setMinLength(5);
        nameField.setFocus(true);
        fieldSet.add(nameField);

        fieldSet.add(new EmailField("email", true));

        fieldSet.add(investmentSelect);
View Full Code Here

        addControl(editLink);
        addControl(deleteLink);

        // Setup customers form
        FieldSet fieldSet = new FieldSet("customer");
        fieldSet.add(new TextField("name"));
        fieldSet.add(new EmailField("email"));
        fieldSet.add(new DoubleField("holdings"));
        fieldSet.add(new DateField("dateJoined"));
        form.add(fieldSet);
        form.add(new Submit("save", this, "onSaveClick"));
View Full Code Here

    // Constructor ------------------------------------------------------------

    public SimpleForm() {
        addControl(form);

        form.add(new TextField("name", true));
        form.add(new Submit("OK"));

        form.setListener(this, "onSubmit");
    }
View Full Code Here

    public EditCustomerPage() {
        addControl(form);

        // Setup customers form
        FieldSet fieldSet = new FieldSet("customer");
        fieldSet.add(new TextField("name", true));
        fieldSet.add(new EmailField("email"));
        fieldSet.add(new DoubleField("holdings", true));
        fieldSet.add(new DateField("dateJoined"));
        form.add(fieldSet);
        form.add(new Submit("save", this, "onSaveClick"));
View Full Code Here

        postCodeLookupWrapper.add(postCodeLookup);
        postCodeLookupWrapper.setStyle("text-align", "right");

        getForm().add(postCodeLookupWrapper);

        getForm().add(new TextField("address.line1", "Line One", true));
        getForm().add(new TextField("address.line2", "Line Two"));
        getForm().add(new TextField("address.suburb", "Suburb", true));

        stateSelect = new QuerySelect("address.state", "State", true);

        stateSelect.setQueryValueLabel("states", "value", "label");
        getForm().add(stateSelect);
View Full Code Here

        radioGroup.add(new Radio("B"));
        radioGroup.add(new Radio("C"));
        fieldSet.add(radioGroup);
        fieldSet.add(select);
        fieldSet.add(new TextArea("textArea"));
        fieldSet.add(new TextField("textField"));

        Button button = new Button("button");
        button.setAttribute("onclick", "alert('Button clicked');");
        form.add(button);
        ImageSubmit imageSubmit = new ImageSubmit("image", "/assets/images/edit-button.gif");
View Full Code Here

        EmailField addressField = new EmailField("address", "To:");
        addressField.setRequired(true);
        addressField.setSize(60);
        form.add(addressField);

        TextField subjectField = new TextField("subject", "Subject:");
        subjectField.setRequired(true);
        subjectField.setSize(60);
        form.add(subjectField);

        RichTextArea messageTextArea = new RichTextArea("message");
        messageTextArea.setLabel("Message:");
        messageTextArea.setCols(45);
View Full Code Here

        // ------
        // Form 1
        form1.setColumns(3);

        // Row 1
        Field titleField = new TextField("title");
        titleField.setStyle("width", "100%");
        form1.add(titleField, 2);
        form1.add(new Label("blank", ""));

        // Row 2
        form1.add(new TextArea("description", 70, 3), 3);

        // Row 3
        form1.add(new TextField("name"));
        form1.add(new TextField("type"));
        form1.add(new TelephoneField("telephone"));

        form1.add(new Submit("ok", " OK "));
        form1.add(new PageSubmit("cancel", HomePage.class));

        //-------
        // Form 2
        form2.setColumns(2);

        FieldSet fieldSet = new FieldSet("fieldSet", "FieldSet");
        form2.add(fieldSet);

        // Row 1
        fieldSet.add(new TextField("name"));
        fieldSet.add(new TextField("type"));

        // Row 2
        fieldSet.add(new TextArea("description", 39, 3), 2);

        // Row 3
View Full Code Here

TOP

Related Classes of org.apache.click.control.TextField

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.