Package org.springmodules.xt.ajax

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


                    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


                    TaggedText.Tag.SPAN);
            msg.addAttribute("class", "warnMessage");
           
            ReplaceContentAction action = new ReplaceContentAction("username.validation", msg);
           
            response.addAction(action);
        }
        return response;
    }
}
View Full Code Here

        MockHttpServletResponse httpResponse = new MockHttpServletResponse();
        AjaxResponse ajaxResponse = new AjaxResponseImpl();
       
        String text = "simple text";
       
        ajaxResponse.addAction(new ReplaceContentAction("test", new SimpleText(text)));
       
        this.sender.sendResponse(httpResponse, ajaxResponse);
       
        assertTrue(httpResponse.getContentAsString().contains(text));
    }
View Full Code Here

        MockHttpServletResponse httpResponse = new MockHttpServletResponse();
        AjaxResponse ajaxResponse = new AjaxResponseImpl("UTF-8");
       
        String text = "questo è un semplice testo";
       
        ajaxResponse.addAction(new ReplaceContentAction("test", new SimpleText(text)));
       
        this.sender.sendResponse(httpResponse, ajaxResponse);
       
        assertTrue(httpResponse.getContentAsString().contains(text));
    }
View Full Code Here

public class DummySubmitHandler extends AbstractAjaxHandler {

    public AjaxResponse submit(AjaxSubmitEvent e) {
        AjaxResponseImpl response = new AjaxResponseImpl();
        AppendContentAction action = new AppendContentAction("submit", new SimpleText("submit"));
        response.addAction(action);
        return response;
    }
   
    public AjaxResponse submitWithException(AjaxSubmitEvent e) throws Exception {
        throw new Exception();
View Full Code Here

public class DummyHandler extends AbstractAjaxHandler {
   
    public AjaxResponse action(AjaxActionEvent e) {
        AjaxResponseImpl response = new AjaxResponseImpl();
        AppendContentAction action = new AppendContentAction("action", new SimpleText("action"));
        response.addAction(action);
        return response;
    }
   
    public AjaxResponse actionWithException(AjaxActionEvent e) throws Exception {
        throw new Exception();
View Full Code Here

        ReplaceContentAction action = new ReplaceContentAction("offices", options);
       
        // Create a concrete ajax response:
        AjaxResponse response = new AjaxResponseImpl();
        // Add the action:
        response.addAction(action);
       
        return response;
    }

    public void setStore(MemoryRepository store) {
View Full Code Here

        AppendContentAction appendRowAction = new AppendContentAction("employees", row);

        // Create a concrete ajax response:
        AjaxResponse response = new AjaxResponseImpl();
        // Add actions:
        response.addAction(appendRowAction);

        return response;
    }
   
    public void setStore(MemoryRepository store) {
View Full Code Here

        ReplaceContentAction replaceRowsAction = new ReplaceContentAction("employees", rows);
       
        // Create a concrete ajax response:
        AjaxResponse response = new AjaxResponseImpl();
        // Add actions:
        response.addAction(setMessageAction);
        response.addAction(highlightAction);
        response.addAction(replaceRowsAction);
       
        return response;
    }
View Full Code Here

       
        // Create a concrete ajax response:
        AjaxResponse response = new AjaxResponseImpl();
        // Add actions:
        response.addAction(setMessageAction);
        response.addAction(highlightAction);
        response.addAction(replaceRowsAction);
       
        return response;
    }
   
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.