Package org.springmodules.xt.ajax.action

Examples of org.springmodules.xt.ajax.action.RemoveContentAction


            // Remove old errors from HTML:
            ObjectError[] errors = errorsContainer.getErrors();
            for (ObjectError error : errors) {
                if (this.rendersError(error)) {
                    ElementMatcher matcher = this.getElementMatcherForError(error);
                    RemoveContentAction removeAction = new RemoveContentAction(matcher);
                    response.addAction(removeAction);
                }
            }
        }
    }
View Full Code Here


        if (event.getValidationErrors() != null && event.getValidationErrors().hasErrors()) {
            Component errorImage = new Image(event.getHttpRequest().getContextPath() + "/images/error.gif", "error");
            Component errorMessage = new TaggedText(
                    this.messageSource.getMessage("message.error", null, "Error", LocaleContextHolder.getLocale()),
                    TaggedText.Tag.SPAN);
            AjaxAction removeAction = new RemoveContentAction("onSuccessMessage");
            AjaxAction replaceAction = new ReplaceContentAction("onErrorsMessage", errorImage, errorMessage);
            AjaxAction effectAction = new Effect("Shake", "onErrorsMessage");
            response.addAction(removeAction);
            response.addAction(replaceAction);
            response.addAction(effectAction);
        } else {
            AjaxAction removeAction = new RemoveContentAction("onErrorsMessage");
            response.addAction(removeAction);
        }
    }
View Full Code Here

        return response;
    }
   
    public AjaxResponse removeNumbers(AjaxActionEvent event) {
        // Create an ajax action for removing all numbers:
        RemoveContentAction action = new RemoveContentAction("num");
       
        // Create a concrete ajax response:
        AjaxResponse response = new AjaxResponseImpl();
        // Add the action:
        response.addAction(action);
View Full Code Here

TOP

Related Classes of org.springmodules.xt.ajax.action.RemoveContentAction

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.