Examples of ElementMatcher


Examples of org.springmodules.xt.ajax.ElementMatcher

        assertXpathEvaluatesTo("plain", "/insert-before/context/matcher/@matchMode", result);
        assertXpathEvaluatesTo("testId1,testId2", "/insert-before/context/matcher/@contextNodeID", result);
    }
   
    public void testRenderWithSelectorMatcher() throws Exception {
        ElementMatcher matcher = new SelectorMatcher(Arrays.asList("#testId1", "#testId2"));
        AjaxAction action = new InsertContentBeforeAction(matcher, Arrays.asList(new Component[]{new TaggedText("Test Component 1", TaggedText.Tag.DIV), new TaggedText("Test Component 2", TaggedText.Tag.DIV)}));
       
        String result = action.render();
       
        System.out.println(result);
View Full Code Here

Examples of org.springmodules.xt.ajax.ElementMatcher

                    // Change the class of the web element that fired the event:
                    SetAttributeAction action1 = new SetAttributeAction(event.getElementId(), "class", "expanded");
                   
                    // Construct the CSS selector identifying the web page part that will be updated with the JSP content:
                    String selector = new StringBuilder("#").append(event.getElementId()).append("~").append("div.entryBody").toString();
                    ElementMatcher matcher = new SelectorMatcher(Arrays.asList(selector));
                    // Replace the content of the web page part identified by the selector:
                    ReplaceContentAction action2 = new ReplaceContentAction(matcher, jsp);
                    // Call a client-side javascript function:
                    Map<String, Object> params = new HashMap<String, Object>();
                    params.put("selector", selector);
View Full Code Here

Examples of org.springmodules.xt.ajax.ElementMatcher

        // Change the class of the web element that fired the event:
        SetAttributeAction action1 = new SetAttributeAction(event.getElementId(), "class", "closed");
       
        // Construct the CSS selector identifying the web page part that will be updated :
        String selector = new StringBuilder("#").append(event.getElementId()).append("~").append("div.entryBody").toString();
        ElementMatcher matcher = new SelectorMatcher(Arrays.asList(selector));
        // Call a client-side javascript function for hiding the entry:
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("selector", selector);
        ExecuteJavascriptFunctionAction action2 = new ExecuteJavascriptFunctionAction("hideEntryEffect", params);
       
View Full Code Here

Examples of org.springmodules.xt.ajax.ElementMatcher

        assertXpathEvaluatesTo("Test Component 2", "/append-as-first-child/content/div[position()=2]", result);
        assertXpathEvaluatesTo("testId", "/append-as-first-child/context/matcher/@contextNodeID", result);
    }
   
    public void testRenderWithListMatcher() throws Exception {
        ElementMatcher matcher = new ListMatcher(Arrays.asList("testId1", "testId2"));
        AjaxAction action = new AppendAsFirstContentAction(matcher, Arrays.asList(new Component[]{new TaggedText("Test Component 1", TaggedText.Tag.DIV), new TaggedText("Test Component 2", TaggedText.Tag.DIV)}));
       
        String result = action.render();
       
        System.out.println(result);
View Full Code Here

Examples of org.springmodules.xt.ajax.ElementMatcher

        assertXpathEvaluatesTo("plain", "/append-as-first-child/context/matcher/@matchMode", result);
        assertXpathEvaluatesTo("testId1,testId2", "/append-as-first-child/context/matcher/@contextNodeID", result);
    }
   
    public void testRenderWithWildcardMatcher() throws Exception {
        ElementMatcher matcher = new WildcardMatcher("testId");
        AjaxAction action = new AppendAsFirstContentAction(matcher, Arrays.asList(new Component[]{new TaggedText("Test Component 1", TaggedText.Tag.DIV), new TaggedText("Test Component 2", TaggedText.Tag.DIV)}));
       
        String result = action.render();
       
        System.out.println(result);
View Full Code Here

Examples of org.springmodules.xt.ajax.ElementMatcher

        assertXpathEvaluatesTo("wildcard", "/append-as-first-child/context/matcher/@matchMode", result);
        assertXpathEvaluatesTo("testId", "/append-as-first-child/context/matcher/@contextNodeID", result);
    }
   
    public void testRenderWithSelectorMatcher() throws Exception {
        ElementMatcher matcher = new SelectorMatcher(Arrays.asList("#testId1", "#testId2"));
        AjaxAction action = new AppendAsFirstContentAction(matcher, Arrays.asList(new Component[]{new TaggedText("Test Component 1", TaggedText.Tag.DIV), new TaggedText("Test Component 2", TaggedText.Tag.DIV)}));
       
        String result = action.render();
       
        System.out.println(result);
View Full Code Here

Examples of org.springmodules.xt.ajax.ElementMatcher

        assertXpathEvaluatesTo("testId", "/set-attributes/context/matcher/@contextNodeID", result);
        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);
View Full Code Here

Examples of org.springmodules.xt.ajax.ElementMatcher

        assertXpathEvaluatesTo("testId", "/set-attributes/context/matcher/@contextNodeID", result);
        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);
View Full Code Here

Examples of org.springmodules.xt.ajax.ElementMatcher

        assertXpathEvaluatesTo("testId1,testId2", "/set-attributes/context/matcher/@contextNodeID", result);
        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);
View Full Code Here

Examples of org.springmodules.xt.ajax.ElementMatcher

       
        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);
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.