Package org.apache.click.ajax

Examples of org.apache.click.ajax.AjaxBehavior


     * Create the field Ajax behavior instance.
     *
     * @return the field Ajax behavior instance
     */
    protected Behavior createBehavior() {
        AjaxBehavior internalBehavior = new DefaultAjaxBehavior() {

            @Override
            public ActionResult onAction(Control source) {
                ActionResult actionResult = new ActionResult();

View Full Code Here


        }

        for (Behavior behavior : source.getBehaviors()) {

            if (behavior instanceof AjaxBehavior) {
                AjaxBehavior ajaxBehavior = (AjaxBehavior) behavior;

                boolean isAjaxTarget = ajaxBehavior.isAjaxTarget(context);

                if (logger.isTraceEnabled()) {
                    String behaviorClassName = ClassUtils.getShortClassName(
                        ajaxBehavior.getClass());
                    HtmlStringBuffer buffer = new HtmlStringBuffer();
                    buffer.append("      invoked: ");
                    buffer.append(behaviorClassName);
                    buffer.append(".isAjaxTarget() : ");
                    buffer.append(isAjaxTarget);
                    logger.trace(buffer.toString());
                }

                if (isAjaxTarget) {

                    // The first non-null ActionResult returned will be rendered, other
                    // ActionResult instances are ignored
                    ActionResult behaviorActionResult =
                        ajaxBehavior.onAction(source);
                    if (actionResult == null && behaviorActionResult != null) {
                        actionResult = behaviorActionResult;
                    }

                    if (logger.isTraceEnabled()) {
                        String behaviorClassName = ClassUtils.getShortClassName(
                            ajaxBehavior.getClass());
                        String actionResultClassName = null;

                        if (behaviorActionResult != null) {
                            actionResultClassName = ClassUtils.getShortClassName(
                                behaviorActionResult.getClass());
View Full Code Here

TOP

Related Classes of org.apache.click.ajax.AjaxBehavior

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.