Package org.apache.click.control

Examples of org.apache.click.control.TextField


        addControl(form);

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

        fieldSet.add(new TextField("name"));

        // Add the submit link to the FieldSet
        fieldSet.add(confirmationLink);

        // Set custom JavaScript for the onclick event. The confirmSubmit function
View Full Code Here


    @Bindable protected Form form = new Form("form");

    public EditCustomerPage() {
        // 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

        // Delivery fieldset

        FieldSet deliveryFieldSet = new FieldSet("deliveryDetails");
        form.add(deliveryFieldSet);

        TextField addressToField = new TextField("addressedTo", true);
        addressToField.setSize(30);
        deliveryFieldSet.add(addressToField);

        TextArea textArea = new TextArea("deliveryAddress", true);
        textArea.setCols(30);
        textArea.setRows(3);
        deliveryFieldSet.add(textArea);

        DateField dateField = new DateField("deliveryDate");
        deliveryFieldSet.add(dateField);

        PackagingRadioGroup radioGroup = new PackagingRadioGroup("packaging");
        radioGroup.setValue("STD");
        radioGroup.setVerticalLayout(true);
        deliveryFieldSet.add(radioGroup);

        deliveryFieldSet.add(new Checkbox("telephoneOnDelivery"));

        // Payment fieldset

        FieldSet paymentFieldSet = new FieldSet("paymentDetails");
        form.add(paymentFieldSet);

        paymentGroup = new RadioGroup("paymentOption", true);
        paymentGroup.add(new Radio("cod", "Cash On Delivery "));
        paymentGroup.add(new Radio("credit", "Credit Card "));
        paymentGroup.setVerticalLayout(false);
        paymentFieldSet.add(paymentGroup);

        cardHolder = new TextField("cardHolderName");
        paymentFieldSet.add(cardHolder);
        cardNumber = new CreditCardField("cardNumber");
        paymentFieldSet.add(cardNumber);
        cardExpiry = new IntegerField("expiry");
        cardExpiry.setSize(4);
View Full Code Here

        form.add(fieldSet1);

        fileField1 = new FileField("selectFile1", "Select File 1", 40);
        fieldSet1.add(fileField1);

        descField1 = new TextField("description1", "File Description 1", 30);
        fieldSet1.add(descField1);

        FieldSet fieldSet2 = new FieldSet("upload2", "<b>Upload File 2</b>");
        form.add(fieldSet2);

        fileField2 = new FileField("selectFile2", "Select File 2", 40);
        fieldSet2.add(fileField2);

        descField2 = new TextField("description2", "File Description 2", 30);
        fieldSet2.add(descField2);

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

public class VelocityMacro extends BorderPage {

    @Bindable protected Form form = new Form();

    public VelocityMacro() {
        TextField nameField = new TextField("name", true);
        nameField.setMinLength(5);
        nameField.setTitle("Customer full name");
        nameField.setFocus(true);
        form.add(nameField);

        EmailField emailField = new EmailField("email", true);
        emailField.setTitle("Customers email address");
        form.add(emailField);
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

    public AdvancedForm() {
        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

    @Bindable protected String msg;

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

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

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

        VerticalFieldSet fieldset = new VerticalFieldSet("contactDetails");
        fieldset.setLegend("Contact Details");

        fieldset.add(new TitleSelect("title"));
        fieldset.add(new TextField("firstName")).setRequired(true);
        fieldset.add(new TextField("middleNames"));
        fieldset.add(new TextField("lastName")).setRequired(true);
        fieldset.add(new TextField("contactNumber"));
        fieldset.add(new EmailField("email"));

        form.add(fieldset);

        fieldset = new VerticalFieldSet("paymentDetails");
        fieldset.setLegend("Payment Details");

        RadioGroup paymentGroup = new RadioGroup("paymentOption");
        paymentGroup.add(new Radio("cod", "Cash On Delivery "));
        paymentGroup.add(new Radio("credit", "Credit Card "));
        paymentGroup.setVerticalLayout(false);
        fieldset.add(paymentGroup);

        // Retrieve the paymentGroup's ListItem, and set its CSS class to "radio"
        ListItem item = (ListItem) fieldset.getHtmlList().getLast();
        item.setAttribute("class", "radio");

        fieldset.add(new TextField("cardholderName"));
        fieldset.add(new CreditCardField("cardNumber")).setRequired(true);
        fieldset.add(new IntegerField("expiry"));

        form.add(fieldset);
View Full Code Here

        FieldSet contactTabSheet = new FieldSet("contactDetails");
        form.addTabSheet(contactTabSheet);

        contactTabSheet.add(new TitleSelect("title"));

        contactTabSheet.add(new TextField("firstName"));

        contactTabSheet.add(new TextField("middleNames"));

        contactTabSheet.add(new TextField("surname", true));

        contactTabSheet.add(contactNumber);

        contactTabSheet.add(new EmailField("email"));
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.