Package org.springmodules.xt.ajax.component

Examples of org.springmodules.xt.ajax.component.SimpleText


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


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

    public AppendContentActionTest(String testName) {
        super(testName);
    }
   
    public void testRender() throws Exception {
        AjaxAction action = new AppendContentAction("testId", new SimpleText("Test Component"));
       
        String result = action.render();
       
        System.out.println(result);
       
View Full Code Here

        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("testId", "/append-as-children/context/matcher/@contextNodeID", result);
    }
   
    public void testRenderWithListMatcher() throws Exception {
        ElementMatcher matcher = new ListMatcher(Arrays.asList("testId1", "testId2"));
        AjaxAction action = new AppendContentAction(matcher, new SimpleText("Test Component"));
       
        String result = action.render();
       
        System.out.println(result);
       
View Full Code Here

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

        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

    public ReplaceContentActionTest(String testName) {
        super(testName);
    }
   
    public void testRender() throws Exception {
        AjaxAction action = new ReplaceContentAction("testId", 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 ReplaceContentAction(matcher, new SimpleText("Test Component"));
       
        String result = action.render();
       
        System.out.println(result);
       
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

TOP

Related Classes of org.springmodules.xt.ajax.component.SimpleText

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.