Package org.apache.click

Examples of org.apache.click.ActionListener


        getForm().setButtonAlign(Form.ALIGN_RIGHT);
        getForm().setErrorsPosition(Form.POSITION_MIDDLE);

        previous = new Submit("previous");
        previous.setLabel("< Previous");
        getPreviousButton().setActionListener(new ActionListener() {
            public boolean onAction(Control source) {
                return onPrevious();
            }
        });
        form.add(previous);
        if (!getWizardPage().hasPreviousStep(this)) {
            previous.setDisabled(true);
        }

        next = new Submit("next");
        next.setLabel("Next >");
        getNextButton().setActionListener(new ActionListener() {
            public boolean onAction(Control source) {
                return onNext();
            }
        });
        form.add(next);
        if (!getWizardPage().hasNextStep(this)) {
            next.setDisabled(true);
        }

        finish = new Submit("Finish");
        getFinishButton().setActionListener(new ActionListener() {
            public boolean onAction(Control source) {
                return onFinish();
            }
        });
        form.add(finish);
        if (!getWizardPage().isLastStep(this)) {
            finish.setDisabled(true);
        }

        cancel = new Submit("Cancel");
        getCancelButton().setActionListener(new ActionListener() {
            public boolean onAction(Control source) {
                return onCancel();
            }
        });
        form.add(cancel);
View Full Code Here


     * @return true to continue Page event processing or false otherwise
     */
    public boolean onProcess() {
        bindRequestValue();

        ControlRegistry.registerActionEvent(this, new ActionListener() {
            public boolean onAction(Control source) {
                return postProcess();
            }
        });
        return true;
View Full Code Here

    public ActionButton button = new ActionButton();
    public String clicked;

    public ActionDemo() {

        link.setActionListener(new ActionListener() {
            public boolean onAction(Control source) {
                clicked = source.getClass().getName() + ".onAction invoked at " + (new Date());
                return true;
            }
        });
View Full Code Here

        TabbedPanel tabbedPanel = new TabbedPanel("tabbedPanel");
        tabbedPanel.add(new Panel("panel1"));
        tabbedPanel.add(new Panel("panel2"));

        tabbedPanel.setTabListener(new ActionListener() {
            public boolean onAction(Control source) {
                return false;
            }
        });
View Full Code Here

    public boolean onProcess() {
        getExpandLink().onProcess();
        getSelectLink().onProcess();
        bindRequestValue();

        ActionEventDispatcher.dispatchActionEvent(this, new ActionListener() {
            public boolean onAction(Control source) {
                return postProcess();
            }
        });
        return true;
View Full Code Here

        throws IOException;

    protected abstract String getFilename();

    protected void setActionListener(AbstractControl control) {
        control.setActionListener(new ActionListener() {

            public boolean onAction(Control source) {
                setSelected(true);
                return true;
            }
View Full Code Here

        form.add(userNameField);
        form.add(passwordField);
        form.add(passwordAgainField);

        Submit submit = new Submit("create");
        submit.setActionListener(new ActionListener() {
            private static final long serialVersionUID = 1L;

            public boolean onAction(Control source) {
                return onCreate();
            }
View Full Code Here

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

    public DynamicSelect() {

        form.setActionListener(new ActionListener() {
            private static final long serialVersionUID = 1L;

            public boolean onAction(Control source) {
                return onFormSubmit();
            }
View Full Code Here

        if (checkbox.isChecked()) {
            // Dynamically add the email Field to the form
            form.add(new EmailField("email", true));
        }

        form.setActionListener(new ActionListener() {
            private static final long serialVersionUID = 1L;

            public boolean onAction(Control source) {
                return onFormSubmit();
            }
View Full Code Here

            // Dynamically add a new Field and FieldSet to the form
            addressFS.add(emailField);
            form.add(addressFS);
        }

        form.setActionListener(new ActionListener() {
            private static final long serialVersionUID = 1L;

            public boolean onAction(Control source) {
                return onFormSubmit();
            }
View Full Code Here

TOP

Related Classes of org.apache.click.ActionListener

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.