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.providerContext;
06:
07: import javax.servlet.jsp.JspException;
08:
09: import com.sun.portal.providers.context.ProviderContext;
10:
11: import com.sun.portal.desktop.context.ContextException;
12: import com.sun.portal.desktop.taglib.DesktopTaglibException;
13:
14: public class GetStringAttributeTag extends
15: BaseProviderContextTagSupport {
16: private String m_key = null;
17:
18: public void setKey(String key) throws DesktopTaglibException {
19: m_key = resolveParameter(key).toString();
20: }
21:
22: public int doStartTag() throws JspException {
23: ProviderContext pc = getCurrentProviderContext();
24: String attr = null;
25: attr = pc.getStringAttribute(m_key);
26: processResult(attr);
27: return SKIP_BODY;
28: }
29: }
|