Package org.apache.click.control

Examples of org.apache.click.control.TextArea


        radioGroup.add(new Radio("A"));
        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);
View Full Code Here


        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);
View Full Code Here

    @SuppressWarnings("unchecked")
    public void testDynamicRequest() {
        MockContext context = MockContext.initContext();
        MockRequest request = context.getMockRequest();

        TextArea textArea = new TextArea("text");
        assertEquals("text", textArea.getName());

        request.setParameter("param", "value");
        request.getParameterMap().put("text", "textvalue");

        // Registry a listener which must be invoked
        textArea.setActionListener(new ActionListener() {
            private static final long serialVersionUID = 1L;

            public boolean onAction(Control source) {
                // When action is invoked, set flag to true
                return actionCalled = true;
            }
        });
        assertTrue(textArea.onProcess());

        // Fire all action events that was registered in the onProcess method
        context.executeActionListeners();

        assertTrue("TextArea action was not invoked", actionCalled);
        assertTrue(textArea.isValid());
        assertEquals("textvalue", textArea.getValue());
        assertEquals("textvalue", textArea.getValueObject());
       
        // Check that getParameterMap() is modifiable by adding a
        // key/value pair.
        context = (MockContext) Context.getThreadLocalContext();
        context.getRequest().getParameterMap().put("textvalue",
          textArea.getValue());
    }
View Full Code Here

        courseSelect = new InvestmentSelect("Course");
        courseSelect.setRequired(true);
        form.add(courseSelect);

        notesField = new TextArea("Booking Notes");
        notesField.setCols(25);
        form.add(notesField);

        form.add(new Submit(" < Back ", this, "onBackClick"));
        form.add(new Submit(" Next > ", this, "onNextClick"));
View Full Code Here

        radioGroup.add(new Radio("A"));
        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);
View Full Code Here

    bFieldset.add(status);
    TextField subtitle = new TextField("subtitle", "Sub-title");
    bFieldset.add(subtitle);
    bFieldset.add(edition);
    bFieldset.add(pubDate);
    TextArea synopsis = new TextArea("synopsis", "Synopsis");
    synopsis.setCols(28);
    synopsis.setRows(3);
    bFieldset.add(synopsis);
    NumberField bulk_price = new NumberField("bulk_price", "Bulk Price");
    bFieldset.add(bulk_price);
    // Publisher
    TextField publisher = new TextField("publisher", "Publisher");
View Full Code Here

                        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

TOP

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

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.