Examples of AjaxAction


Examples of org.springmodules.xt.ajax.AjaxAction

    public ReplaceElementActionTest(String testName) {
        super(testName);
    }
   
    public void testRender() throws Exception {
        AjaxAction action = new ReplaceElementAction("testId", new SimpleText("Test Component"));
       
        String result = action.render();
       
        System.out.println(result);
       
        assertXpathEvaluatesTo("Test Component", "/replace", result);
        assertXpathEvaluatesTo("testId", "/replace/context/matcher/@contextNodeID", result);
View Full Code Here

Examples of org.springmodules.xt.ajax.AjaxAction

        assertXpathEvaluatesTo("testId", "/replace/context/matcher/@contextNodeID", result);
    }
   
    public void testRenderWithWildcardMatcher() throws Exception {
        ElementMatcher matcher = new WildcardMatcher("testId");
        AjaxAction action = new ReplaceElementAction(matcher, new SimpleText("Test Component"));
       
        String result = action.render();
       
        System.out.println(result);
       
        assertXpathEvaluatesTo("Test Component", "/replace", result);
        assertXpathEvaluatesTo("wildcard", "/replace/context/matcher/@matchMode", result);
View Full Code Here

Examples of org.springmodules.xt.ajax.AjaxAction

        assertXpathEvaluatesTo("testId", "/replace/context/matcher/@contextNodeID", result);
    }
   
    public void testRenderWithListMatcher() throws Exception {
        ElementMatcher matcher = new ListMatcher(Arrays.asList("testId1", "testId2"));
        AjaxAction action = new ReplaceElementAction(matcher, new SimpleText("Test Component"));
       
        String result = action.render();
       
        System.out.println(result);
       
        assertXpathEvaluatesTo("Test Component", "/replace", result);
        assertXpathEvaluatesTo("plain", "/replace/context/matcher/@matchMode", result);
View Full Code Here

Examples of org.springmodules.xt.ajax.AjaxAction

        assertXpathEvaluatesTo("testId1,testId2", "/replace/context/matcher/@contextNodeID", result);
    }
   
    public void testRenderWithSelectorMatcher() throws Exception {
        ElementMatcher matcher = new SelectorMatcher(Arrays.asList("#testId1", "#testId2"));
        AjaxAction action = new ReplaceElementAction(matcher, new SimpleText("Test Component"));
       
        String result = action.render();
       
        System.out.println(result);
       
        assertXpathEvaluatesTo("Test Component", "/replace", result);
        assertXpathEvaluatesTo("selector", "/replace/context/matcher/@matchMode", result);
View Full Code Here

Examples of org.springmodules.xt.ajax.AjaxAction

        String rendering = null;
        DefaultValidationHandler handler = new DefaultValidationHandler();
        handler.setMessageSource(new DelegatingMessageSource());
        handler.setSuccessRenderingCallback(new SuccessRenderingCallback() {
            public AjaxAction[] getSuccessActions(AjaxSubmitEvent event) {
                AjaxAction action = new ReplaceContentAction("test", new SimpleText("Default message"));
                return new AjaxAction[]{action};
            }
        });
       
        response = handler.validate(submitEvent);
View Full Code Here

Examples of org.springmodules.xt.ajax.AjaxAction

       
        return response;
    }
   
    public AjaxResponse testErrorHandler(AjaxActionEvent event) {
        AjaxAction action = new AbstractExecuteJavascriptAction() {
            protected String getJavascript() {
                return "throw {'message' : 'This is a javascript error!'};";
            }
        };
       
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.