Package org.apache.click

Examples of org.apache.click.ActionResult


        // Lookup the contentType for a PNG image
        String contentType = ClickUtils.getMimeType("png");

        // Return an ActionResult containing the image data
        return new ActionResult(imageData, contentType);
    }
View Full Code Here


    /**
     * This method will be invoked when the link is clicked.
     */
    public ActionResult getDate() {
        return new ActionResult(format.currentDate("MMM dd, yyyy HH:MM:ss"));
    }
View Full Code Here

        return form.onSubmitCheck(this, "/pageflow/invalid-submit.html");
    }

    // A pageAction that handles Ajax requests for a particular customer
    public ActionResult onChangeCustomer() {
        ActionResult actionResult = new ActionResult();

        // Lookup customer based on request parameter 'customerId'
        String customerId = getContext().getRequest().getParameter("customerId");
        Customer customer = customerService.findCustomerByID(customerId);

        // CustomerPanel will render the customer as an HTML snippet
        CustomerPanel customerPanel = new CustomerPanel(this, customer);
        actionResult.setContent(customerPanel.toString());

        // Set content type and character encoding
        actionResult.setCharacterEncoding("UTF-8");
        actionResult.setContentType(ActionResult.HTML);

        return actionResult;
    }
View Full Code Here

TOP

Related Classes of org.apache.click.ActionResult

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.