Package org.apache.click

Examples of org.apache.click.ActionListener


       
        request.setParameter("button", "true");
        assertTrue(button.onProcess());
       
        final boolean check[] = new boolean[1];
        button.setActionListener(new ActionListener() {
            private static final long serialVersionUID = 1L;

            public boolean onAction(Control source) {
                check[0] = true;
                return false;
View Full Code Here


       
        request.setParameter("button", "true");
        assertTrue(button.onProcess());
       
        final boolean check[] = new boolean[1];
        button.setActionListener(new ActionListener() {
            private static final long serialVersionUID = 1L;

            public boolean onAction(Control source) {
                check[0] = true;
                return false;
View Full Code Here

                return new ActionResult(msg, ActionResult.HTML);
            }
        });

        // If JavaScript is disabled, the ActionListener will be called instead
        link.setActionListener(new ActionListener() {

            public boolean onAction(Control source) {
                // Formatted date instance that will be added to the
                String now = format.currentDate("MMM, yyyy dd HH:MM:ss");
View Full Code Here

        form.add(new HiddenField("tabPanelIndex", tabIndex));

        final TextField field = new TextField("name", "Enter your name");
        form.add(field);
        Submit submit = new Submit("go");
        submit.setActionListener(new ActionListener() {

            public boolean onAction(Control source) {
                addModel("msg", "Hi " + field.getValue() + ". Your form has been saved!");
                return true;
            }
View Full Code Here

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

        // The SubmitLink action listener
        submitLink.setActionListener(new ActionListener() {

            public boolean onAction(Control source) {
                demo1Msg = submitLink.getName() + ".onAction invoked at "
                    + (new Date());
                return true;
View Full Code Here

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

        // The Parametrized SubmitLink action listener
        paramLink.setActionListener(new ActionListener() {

            public boolean onAction(Control source) {
                demo2Msg = paramLink.getName() + ".onAction invoked at "
                    + (new Date());
                demo2Msg += "<br>Parameters:" + paramLink.getParameters();
View Full Code Here

        // Add the Standalone SubmitLink to the Page
        addControl(standaloneLink);

        // The Standalone SubmitLink action listener
        standaloneLink.setActionListener(new ActionListener() {

            public boolean onAction(Control source) {
                demo3Msg = source.getName() + ".onAction invoked at " +
                    (new Date());
                return true;
View Full Code Here

        // is defined in the page template -> submit-link-demo.htm
        String clickEvent = "return confirmSubmit(this, '" + form.getId() + "', 'Are you sure?');";
        confirmationLink.setOnClick(clickEvent);

        // The Parametrized SubmitLink action listener
        confirmationLink.setActionListener(new ActionListener() {

            public boolean onAction(Control source) {
                demo4Msg = confirmationLink.getName() + ".onAction invoked at "
                    + (new Date());
                return true;
View Full Code Here

        if(form.isFormSubmission() && !submit.isClicked()) {
            form.setValidate(false);
            addModel("msg", "Validation is bypassed");
        }

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

            public boolean onAction(Control source) {
                if (form.isValid()) {
                addModel("msg", "Form is valid after validation");
View Full Code Here

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

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

            public boolean onAction(Control source) {
                if (form.isValid()) {
                addModel("msg", "Form is valid after validation");
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.