1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.apache.struts2.components;
22
23 import javax.servlet.http.HttpServletRequest;
24 import javax.servlet.http.HttpServletResponse;
25
26 import org.apache.struts2.views.annotations.StrutsTag;
27
28 import com.opensymphony.xwork2.util.ValueStack;
29
30 /***
31 * <!-- START SNIPPET: javadoc -->
32 *
33 * Render action messages if they exists, specific rendering layout depends on the
34 * theme itself.
35 *
36 * <!-- END SNIPPET: javadoc -->
37 *
38 * <p/> <b>Examples</b>
39 *
40 * <pre>
41 * <!-- START SNIPPET: example -->
42 * <s:actionmessage />
43 * <s:form .... >
44 * ....
45 * </s:form>
46 * <!-- END SNIPPET: example -->
47 * </pre>
48 *
49 */
50 @StrutsTag(name="actionmessage", tldBodyContent="empty", tldTagClass="org.apache.struts2.views.jsp.ui.ActionMessageTag", description="Render action messages if they exists")
51 public class ActionMessage extends UIBean {
52
53 private static final String TEMPLATE = "actionmessage";
54
55 public ActionMessage(ValueStack stack, HttpServletRequest request, HttpServletResponse response) {
56 super(stack, request, response);
57 }
58
59 protected String getDefaultTemplate() {
60 return TEMPLATE;
61 }
62 }