01: /*
02: * Copyright 2001 Sun Microsystems, Inc. All rights reserved.
03: * PROPRIETARY/CONFIDENTIAL. Use of this product is subject to license terms.
04: */
05: package com.sun.portal.desktop.taglib.container.tab;
06:
07: import javax.servlet.jsp.JspException;
08:
09: import com.sun.portal.desktop.taglib.BaseDesktopTagSupport;
10: import com.sun.portal.desktop.taglib.DesktopTaglibException;
11: import com.sun.portal.providers.containers.jsp.tab.UnmodifiableTab;
12:
13: public class ObtainTabTag extends BaseTabContainerTagSupport {
14: private UnmodifiableTab mTab = null;
15:
16: public void setTab(String tab) throws DesktopTaglibException {
17: if (!isContextVariable(tab)) {
18: throw new DesktopTaglibException(
19: DesktopTaglibException.INVALID_PARAMETER, tab);
20: }
21: mTab = (UnmodifiableTab) resolveParameter(tab);
22: }
23:
24: public int doStartTag() throws JspException {
25: setCurrentTab(mTab);
26: return EVAL_BODY_INCLUDE;
27: }
28:
29: public int doEndTag() throws JspException {
30: setCurrentTab(null);
31: return EVAL_PAGE;
32: }
33: }
|