1 |
| |
2 |
| |
3 |
| |
4 |
| |
5 |
| package com.opensymphony.oscache.web.tag; |
6 |
| |
7 |
| import javax.servlet.jsp.JspTagException; |
8 |
| import javax.servlet.jsp.tagext.TagSupport; |
9 |
| |
10 |
| |
11 |
| |
12 |
| |
13 |
| |
14 |
| |
15 |
| public class GroupsTag extends TagSupport { |
16 |
| private Object groups = null; |
17 |
| |
18 |
0
| public int doStartTag() throws JspTagException {
|
19 |
0
| CacheTag ancestorCacheTag = (CacheTag) TagSupport.findAncestorWithClass(this, CacheTag.class);
|
20 |
| |
21 |
0
| if (ancestorCacheTag == null) {
|
22 |
0
| throw new JspTagException("GroupsTag cannot be used from outside a CacheTag");
|
23 |
| } |
24 |
| |
25 |
0
| ancestorCacheTag.addGroups(String.valueOf(groups));
|
26 |
| |
27 |
0
| return EVAL_BODY_INCLUDE;
|
28 |
| } |
29 |
| |
30 |
0
| public void setGroups(Object groups) {
|
31 |
0
| this.groups = groups;
|
32 |
| } |
33 |
| } |