Package org.springmodules.xt.ajax.action.matcher

Examples of org.springmodules.xt.ajax.action.matcher.WildcardMatcher


     * By default, it returns a {@link org.springmodules.xt.ajax.action.matcher.WildcardMatcher}
     * based on the error code.<br>
     * Subclasses can override this to provide their own ElementMatcher strategy.
     */
    protected ElementMatcher getElementMatcherForError(ObjectError error) {
        return new WildcardMatcher(error.getCode());
    }
View Full Code Here


        assertXpathEvaluatesTo("Test Component 2", "/insert-after/content/div[position()=2]", result);
        assertXpathEvaluatesTo("testId", "/insert-after/context/matcher/@contextNodeID", result);
    }
   
    public void testRenderWithWildcardMatcher() throws Exception {
        ElementMatcher matcher = new WildcardMatcher("testId");
        AjaxAction action = new InsertContentAfterAction(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

        assertXpathEvaluatesTo("Test Component", "/append-as-children/content", result);
        assertXpathEvaluatesTo("testId", "/append-as-children/context/matcher/@contextNodeID", result);
    }
   
    public void testRenderWithWildcardMatcher() throws Exception {
        ElementMatcher matcher = new WildcardMatcher("testId");
        AjaxAction action = new AppendContentAction(matcher, new SimpleText("Test Component"));
       
        String result = action.render();
       
        System.out.println(result);
View Full Code Here

        assertXpathEvaluatesTo("Test Component 2", "/insert-before/content/div[position()=2]", result);
        assertXpathEvaluatesTo("testId", "/insert-before/context/matcher/@contextNodeID", result);
    }
   
    public void testRenderWithWildcardMatcher() throws Exception {
        ElementMatcher matcher = new WildcardMatcher("testId");
        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

        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

        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

       
        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

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

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

        assertXpathEvaluatesTo("Test Component", "/replace", result);
        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);
View Full Code Here

TOP

Related Classes of org.springmodules.xt.ajax.action.matcher.WildcardMatcher

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.