01: /*
02: * Copyright (c) 2002-2003 by OpenSymphony
03: * All rights reserved.
04: */
05: package com.opensymphony.webwork.views.jsp;
06:
07: import com.opensymphony.webwork.components.ActionComponent;
08: import com.opensymphony.webwork.components.Component;
09: import com.opensymphony.xwork.util.OgnlValueStack;
10:
11: import javax.servlet.http.HttpServletRequest;
12: import javax.servlet.http.HttpServletResponse;
13:
14: /**
15: * @see ActionComponent
16: *
17: * @author tm_jee
18: * @version $Date: 2006-10-14 18:02:49 +0200 (Sat, 14 Oct 2006) $ $Id: ActionTag.java 2730 2006-10-14 16:02:49Z tmjee $
19: */
20: public class ActionTag extends ComponentTagSupport {
21:
22: private static final long serialVersionUID = 3489344114527444316L;
23:
24: protected String name;
25: protected String namespace;
26: protected boolean executeResult;
27: protected boolean ignoreContextParams;
28: protected boolean flush;
29:
30: public Component getBean(OgnlValueStack stack,
31: HttpServletRequest req, HttpServletResponse res) {
32: return new ActionComponent(stack, req, res);
33: }
34:
35: protected void populateParams() {
36: super .populateParams();
37:
38: ActionComponent action = (ActionComponent) component;
39: action.setName(name);
40: action.setNamespace(namespace);
41: action.setExecuteResult(executeResult);
42: action.setIgnoreContextParams(ignoreContextParams);
43: action.setFlush(flush);
44: action.start(pageContext.getOut());
45: }
46:
47: protected void addParameter(String name, Object value) {
48: ActionComponent ac = (ActionComponent) component;
49: ac.addParameter(name, value);
50: }
51:
52: public void setName(String name) {
53: this .name = name;
54: }
55:
56: public void setNamespace(String namespace) {
57: this .namespace = namespace;
58: }
59:
60: public void setExecuteResult(boolean executeResult) {
61: this .executeResult = executeResult;
62: }
63:
64: public void setIgnoreContextParams(boolean ignoreContextParams) {
65: this .ignoreContextParams = ignoreContextParams;
66: }
67:
68: public void setFlush(boolean flush) {
69: this.flush = flush;
70: }
71: }
|