Package org.springmodules.xt.ajax

Examples of org.springmodules.xt.ajax.AjaxAction


    public SetAttributeActionTest(String testName) {
        super(testName);
    }
   
    public void testRender() throws Exception {
        AjaxAction action = new SetAttributeAction("testId", "class", "testClass");
       
        String result = action.render();
       
        System.out.println(result);
       
        assertXpathEvaluatesTo("testId", "/set-attributes/context/matcher/@contextNodeID", result);
        assertXpathEvaluatesTo("testClass", "/set-attributes/content/attributes/@class", result);
View Full Code Here


        assertXpathEvaluatesTo("testClass", "/set-attributes/content/attributes/@class", result);
    }
   
    public void testRenderWithWildcardMatcher() throws Exception {
        ElementMatcher matcher = new WildcardMatcher("testId");
        AjaxAction action = new SetAttributeAction(matcher, "class", "testClass");
       
        String result = action.render();
       
        System.out.println(result);
       
        assertXpathEvaluatesTo("wildcard", "/set-attributes/context/matcher/@matchMode", result);
        assertXpathEvaluatesTo("testId", "/set-attributes/context/matcher/@contextNodeID", result);
View Full Code Here

        assertXpathEvaluatesTo("testClass", "/set-attributes/content/attributes/@class", result);
    }
   
    public void testRenderWithListMatcher() throws Exception {
        ElementMatcher matcher = new ListMatcher(Arrays.asList("testId1", "testId2"));
        AjaxAction action = new SetAttributeAction(matcher, "class", "testClass");
       
        String result = action.render();
       
        System.out.println(result);
       
        assertXpathEvaluatesTo("plain", "/set-attributes/context/matcher/@matchMode", result);
        assertXpathEvaluatesTo("testId1,testId2", "/set-attributes/context/matcher/@contextNodeID", result);
View Full Code Here

        assertXpathEvaluatesTo("testClass", "/set-attributes/content/attributes/@class", result);
    }
   
    public void testRenderWithSelectorMatcher() throws Exception {
        ElementMatcher matcher = new SelectorMatcher(Arrays.asList("#testId1", "#testId2"));
        AjaxAction action = new SetAttributeAction(matcher, "class", "testClass");
       
        String result = action.render();
       
        System.out.println(result);
       
        assertXpathEvaluatesTo("selector", "/set-attributes/context/matcher/@matchMode", result);
        assertXpathEvaluatesTo("#testId1,#testId2", "/set-attributes/context/matcher/@contextNodeSelector", result);
View Full Code Here

    public RemoveElementActionTest(String testName) {
        super(testName);
    }

    public void testRender() throws Exception {
        AjaxAction action = new RemoveElementAction("testId");
       
        String result = action.render();
       
        System.out.println(result);
       
        assertXpathEvaluatesTo("testId", "/delete/context/matcher/@contextNodeID", result);
    }
View Full Code Here

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

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

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

    public ShowElementTest(String testName) {
        super(testName);
    }

    public void testRender() throws Exception {
        AjaxAction action = new ShowElement("testId");
       
        String result = action.render();
       
        System.out.println(result);
    }
View Full Code Here

    public HideElementTest(String testName) {
        super(testName);
    }

    public void testRender() throws Exception {
        AjaxAction action = new HideElement("testId");
       
        String result = action.render();
       
        System.out.println(result);
    }
View Full Code Here

TOP

Related Classes of org.springmodules.xt.ajax.AjaxAction

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.