Package org.springmodules.xt.ajax

Examples of org.springmodules.xt.ajax.AjaxResponse.addAction()


    private static final Logger logger = Logger.getLogger(AjaxRedirectSender.class);
   
    public static void sendRedirect(HttpServletResponse httpResponse, String redirectUrl, Map model) throws IOException {
        logger.debug(new StringBuilder("Sending ajax redirect: ").append(redirectUrl));
        AjaxResponse ajaxResponse = new AjaxResponseImpl();
        ajaxResponse.addAction(new RedirectAction(redirectUrl, (Map) null));
        AjaxResponseSender.sendResponse(httpResponse, ajaxResponse);
    }
}
View Full Code Here


            model.put(this.exceptionMessageAttribute, ex.getClass());
        }
        // Create the response with the redirect action:
        AjaxResponse ajaxResponse = new AjaxResponseImpl();
        AjaxAction ajaxRedirect = new RedirectAction(new StringBuilder(request.getContextPath()).append(this.redirectUrl).toString(), model);
        ajaxResponse.addAction(ajaxRedirect);
        return ajaxResponse;
    }

    /**
     * Get the redirect URL.
View Full Code Here

                    ReplaceContentAction action1 = new ReplaceContentAction("viewer", jsp);
                    // Re-apply javascript Behaviour rules:
                    ApplyBehaviour action2 = new ApplyBehaviour();
                   
                    // Add actions to response:
                    response.addAction(action1);
                    response.addAction(action2);
                } else {
                    this.renderErrorMessage(event, response, "message.error.feed.not.found", "No feed found.");
                }
            } catch (UserNotExistentException ex) {
View Full Code Here

                    // Re-apply javascript Behaviour rules:
                    ApplyBehaviour action2 = new ApplyBehaviour();
                   
                    // Add actions to response:
                    response.addAction(action1);
                    response.addAction(action2);
                } else {
                    this.renderErrorMessage(event, response, "message.error.feed.not.found", "No feed found.");
                }
            } catch (UserNotExistentException ex) {
                logger.warn(ex.getMessage(), ex.getCause());
View Full Code Here

                    Map<String, Object> params = new HashMap<String, Object>();
                    params.put("selector", selector);
                    ExecuteJavascriptFunctionAction action3 = new ExecuteJavascriptFunctionAction("showEntryEffect", params);
                   
                    // Add actions to response:
                    response.addAction(action1);
                    response.addAction(action2);
                    response.addAction(action3);
                } else {
                    this.renderErrorMessage(event, response, "message.error.feed.not.found", "No feed found.");
                }
View Full Code Here

                    params.put("selector", selector);
                    ExecuteJavascriptFunctionAction action3 = new ExecuteJavascriptFunctionAction("showEntryEffect", params);
                   
                    // Add actions to response:
                    response.addAction(action1);
                    response.addAction(action2);
                    response.addAction(action3);
                } else {
                    this.renderErrorMessage(event, response, "message.error.feed.not.found", "No feed found.");
                }
            } catch (UserNotExistentException ex) {
View Full Code Here

                    ExecuteJavascriptFunctionAction action3 = new ExecuteJavascriptFunctionAction("showEntryEffect", params);
                   
                    // Add actions to response:
                    response.addAction(action1);
                    response.addAction(action2);
                    response.addAction(action3);
                } else {
                    this.renderErrorMessage(event, response, "message.error.feed.not.found", "No feed found.");
                }
            } catch (UserNotExistentException ex) {
                logger.warn(ex.getMessage(), ex.getCause());
View Full Code Here

        Map<String, Object> params = new HashMap<String, Object>();
        params.put("selector", selector);
        ExecuteJavascriptFunctionAction action2 = new ExecuteJavascriptFunctionAction("hideEntryEffect", params);
       
        // Add actions to response:
        response.addAction(action1);
        response.addAction(action2);
       
        return response;
    }
   
View Full Code Here

        params.put("selector", selector);
        ExecuteJavascriptFunctionAction action2 = new ExecuteJavascriptFunctionAction("hideEntryEffect", params);
       
        // Add actions to response:
        response.addAction(action1);
        response.addAction(action2);
       
        return response;
    }
   
    private void renderErrorMessage(AjaxActionEvent event, AjaxResponse response, String messageCode, String defaultMessage) {
View Full Code Here

                    TaggedText.Tag.SPAN);
            msg.addAttribute("class", "okMessage");
           
            ReplaceContentAction action = new ReplaceContentAction("username.validation", msg);
           
            response.addAction(action);
        } else {
            TaggedText msg = new TaggedText(
                    this.messageSource.getMessage("user.unavailable.username", null, "Not Available", LocaleContextHolder.getLocale()),
                    TaggedText.Tag.SPAN);
            msg.addAttribute("class", "warnMessage");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.