FileDocCategorySizeDatePackage
SubmitAjaxTest.javaAPI DocExample3952Mon Jul 23 13:26:16 BST 2007org.apache.struts2.views.jsp.ui

SubmitAjaxTest

public class SubmitAjaxTest extends org.apache.struts2.views.jsp.AbstractUITagTest
Test Submit component in "ajax" theme.

Fields Summary
Constructors Summary
Methods Summary
public voidtestButton()

        TestAction testAction = (TestAction) action;
        testAction.setFoo("bar");

        SubmitTag tag = new SubmitTag();
        tag.setPageContext(pageContext);

        tag.setId("a");
        tag.setTheme("ajax");
        tag.setHref("b");
        tag.setLoadingText("c");
        tag.setErrorText("d");
        tag.setListenTopics("e");
        tag.setPreInvokeJS("f");
        tag.setOnLoadJS("g");
        tag.setHandler("h");
        tag.setType("button");
        tag.setLabel("i");
        tag.setNotifyTopics("k");
        tag.setIndicator("l");
        tag.doStartTag();
        tag.doEndTag();

        verify(SubmitAjaxTest.class.getResource("submit-ajax-2.txt"));
    
public voidtestGenericAjax()

        AbstractRemoteCallUITag tag = new DivTag();
        verifyGenericProperties(tag, "ajax", new String[]{"value","tabindex","disabled"});
    
public voidtestGenericSimple()

        AbstractRemoteCallUITag tag = new DivTag();
        verifyGenericProperties(tag, "simple", new String[]{"value","tabindex","disabled"});
    
public voidtestGenericXhtml()

        AbstractRemoteCallUITag tag = new DivTag();
        verifyGenericProperties(tag, "xhtml", new String[]{"value","tabindex","disabled"});
    
public voidtestImage()

        TestAction testAction = (TestAction) action;
        testAction.setFoo("bar");

        SubmitTag tag = new SubmitTag();
        tag.setPageContext(pageContext);

        tag.setId("a");
        tag.setTheme("ajax");
        tag.setHref("b");
        tag.setLoadingText("c");
        tag.setErrorText("d");
        tag.setListenTopics("e");
        tag.setPreInvokeJS("f");
        tag.setOnLoadJS("g");
        tag.setHandler("h");
        tag.setType("image");
        tag.setLabel("i");
        tag.setSrc("j");
        tag.setNotifyTopics("k");
        tag.setIndicator("l");
        tag.doStartTag();
        tag.doEndTag();

        verify(SubmitAjaxTest.class.getResource("submit-ajax-3.txt"));
    
public voidtestSubmit()

        TestAction testAction = (TestAction) action;
        testAction.setFoo("bar");

        SubmitTag tag = new SubmitTag();
        tag.setPageContext(pageContext);

        tag.setId("a");
        tag.setTheme("ajax");
        tag.setHref("b");
        tag.setLoadingText("c");
        tag.setErrorText("d");
        tag.setListenTopics("e");
        tag.setPreInvokeJS("f");
        tag.setOnLoadJS("g");
        tag.setHandler("h");
        tag.setType("submit");
        tag.setLabel("i");
        tag.setNotifyTopics("k");
        tag.setIndicator("l");
        tag.setShowLoadingText("true");
        tag.doStartTag();
        tag.doEndTag();

        verify(SubmitAjaxTest.class.getResource("submit-ajax-1.txt"));