KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > opensymphony > webwork > views > jsp > ui > SubmitAjaxTest


1 /**
2  * Copyright: Copyright (c) From Down & Around, Inc.
3  */

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 /**
12  * @author Ian Roughley
13  * @version $Id: SubmitAjaxTest.java,v 1.2 2005/08/11 01:48:10 roughley Exp $
14  */

15 public class SubmitAjaxTest extends AbstractUITagTest {
16
17     //~ Methods ////////////////////////////////////////////////////////////////
18

19     public void testSimple() throws Exception JavaDoc {
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