1 4 5 package com.opensymphony.webwork.views.jsp.ui; 6 7 import com.opensymphony.webwork.views.jsp.AbstractUITagTest; 8 import com.opensymphony.webwork.views.jsp.ui.SubmitTag; 9 import com.opensymphony.webwork.views.jsp.ui.HrefTest; 10 11 15 public class SubmitAjaxTest extends AbstractUITagTest { 16 17 19 public void testSimple() throws Exception { 20 SubmitTag tag = new SubmitTag(); 21 tag.setPageContext(pageContext); 22 23 tag.setId("mylink"); 24 tag.setValue("submit"); 25 tag.setTheme("ajax"); 26 tag.setResultDivId("formId"); 27 tag.setOnLoadJS("alert('form submitted');"); 28 tag.setListenTopics("a"); 29 tag.setNotifyTopics("b"); 30 31 tag.doStartTag(); 32 tag.doEndTag(); 33 34 verify(HrefTest.class.getResource("submit-ajax-1.txt")); 35 } 36 37 } | Popular Tags |