1
2
3
4 package org.apache.tiles.jsp.taglib;
5
6 import java.io.IOException;
7
8 import javax.servlet.jsp.JspException;
9 import javax.servlet.jsp.tagext.SimpleTagSupport;
10
11 import org.apache.tiles.autotag.core.runtime.AutotagRuntime;
12
13
14
15
16 public class SetCurrentContainerTag extends SimpleTagSupport {
17
18
19
20
21 private org.apache.tiles.template.SetCurrentContainerModel model = new org.apache.tiles.template.SetCurrentContainerModel();
22
23
24
25
26
27 private java.lang.String containerKey;
28
29
30
31
32
33
34
35
36 public java.lang.String getContainerKey() {
37 return containerKey;
38 }
39
40
41
42
43
44
45
46
47 public void setContainerKey(java.lang.String containerKey) {
48 this.containerKey = containerKey;
49 }
50
51
52 @Override
53 public void doTag() throws JspException, IOException {
54 AutotagRuntime<org.apache.tiles.request.Request> runtime = new org.apache.tiles.request.jsp.autotag.JspAutotagRuntime();
55 if (runtime instanceof SimpleTagSupport) {
56 SimpleTagSupport tag = (SimpleTagSupport) runtime;
57 tag.setJspContext(getJspContext());
58 tag.setJspBody(getJspBody());
59 tag.setParent(getParent());
60 tag.doTag();
61 }
62 org.apache.tiles.request.Request request = runtime.createRequest();
63 model.execute(
64 containerKey,
65 request
66 );
67 }
68 }