Package org.springmodules.xt.ajax.validation.support.internal

Examples of org.springmodules.xt.ajax.validation.support.internal.ErrorsContainer


   
    /*** Class internals ***/
   
    private void removeOldErrors(AjaxSubmitEvent event, AjaxResponseImpl response) {
        HttpServletRequest request = event.getHttpRequest();
        ErrorsContainer errorsContainer = (ErrorsContainer) request.getSession(true).getAttribute(this.getErrorsAttributeName(request));
        if (errorsContainer != null) {
            logger.debug("Found errors for URL: " + request.getRequestURL().toString());
            logger.debug("Removing old errors.");
            // Remove old errors from session:
            request.getSession(true).removeAttribute(this.getErrorsAttributeName(request));
            // 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


        HttpServletRequest request = event.getHttpRequest();
        Locale locale = LocaleContextHolder.getLocale(); // <- Get the current Locale, if any ...
        // Put new errors into http session for later retrieval:
        logger.debug("Putting errors in session for URL: " + request.getRequestURL().toString());
        request.getSession(true).setAttribute(this.getErrorsAttributeName(request),
                new ErrorsContainer(errors.toArray(new ObjectError[errors.size()])));
        // Put new errors into HTML:
        for (ObjectError error : errors) {
            if (this.rendersError(error)) {
                ElementMatcher matcher = this.getElementMatcherForError(error);
                Component renderingComponent = this.errorRenderingCallback.getErrorComponent(event, error, this.messageSource, locale);
View Full Code Here

TOP

Related Classes of org.springmodules.xt.ajax.validation.support.internal.ErrorsContainer

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.