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.ModelBody;
12 import org.apache.tiles.autotag.core.runtime.AutotagRuntime;
13
14
15
16
17
18
19
20
21
22
23
24 public class AddListAttributeTag extends SimpleTagSupport {
25
26
27
28
29 private org.apache.tiles.template.AddListAttributeModel model = new org.apache.tiles.template.AddListAttributeModel();
30
31
32
33
34 private java.lang.String role;
35
36
37
38
39
40
41
42 public java.lang.String getRole() {
43 return role;
44 }
45
46
47
48
49
50
51
52 public void setRole(java.lang.String role) {
53 this.role = role;
54 }
55
56
57 @Override
58 public void doTag() throws JspException, IOException {
59 AutotagRuntime<org.apache.tiles.request.Request> runtime = new org.apache.tiles.request.jsp.autotag.JspAutotagRuntime();
60 if (runtime instanceof SimpleTagSupport) {
61 SimpleTagSupport tag = (SimpleTagSupport) runtime;
62 tag.setJspContext(getJspContext());
63 tag.setJspBody(getJspBody());
64 tag.setParent(getParent());
65 tag.doTag();
66 }
67 org.apache.tiles.request.Request request = runtime.createRequest();
68 ModelBody modelBody = runtime.createModelBody();
69 model.execute(
70 role,
71 request, modelBody
72 );
73 }
74 }