KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mmbase > bridge > jsp > taglib > util > StandaloneContextContainer


1 /*
2
3 This software is OSI Certified Open Source Software.
4 OSI Certified is a certification mark of the Open Source Initiative.
5
6 The license (Mozilla version 1.0) can be read at the MMBase site.
7 See http://www.MMBase.org/license
8
9 */

10 package org.mmbase.bridge.jsp.taglib.util;
11
12 import javax.servlet.jsp.PageContext JavaDoc;
13 import java.util.Map JavaDoc;
14
15 /**
16  * This ContextContainer provides its own 'backing', it is used as 'subcontext' in other contextes.
17  *
18  * @author Michiel Meeuwissen
19  * @version $Id: StandaloneContextContainer.java,v 1.11.2.1 2006/11/22 14:52:10 michiel Exp $
20  * @since MMBase-1.8
21  **/

22
23 public class StandaloneContextContainer extends ContextContainer {
24
25
26     /**
27      * A simple map, which besides to itself also registers to page-context.
28      */

29     protected BasicBacking backing;
30         
31     /**
32      * Since a ContextContainer can contain other ContextContainer, it
33      * has to know which ContextContainer contains this. And it also
34      * has an id.
35      */

36     public StandaloneContextContainer(PageContext JavaDoc pc, String JavaDoc i, ContextContainer p) {
37         super(i, p);
38         backing = new BasicBacking(pc, false);
39         // values must fall through to PageContext, otherwise you always must prefix by context, even in it.
40
}
41
42
43     protected Backing getBacking() {
44         return backing;
45     }
46
47     public void release(PageContext JavaDoc pc, ContextContainer p) {
48         super.release(pc, p);
49         backing.release();
50     }
51
52
53
54     protected boolean checkJspVar(String JavaDoc jspvar, String JavaDoc id) {
55         return true;
56     }
57     
58 }
59
Popular Tags