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.table;
06:
07: import javax.servlet.jsp.JspException;
08: import javax.servlet.http.HttpServletRequest;
09:
10: import com.sun.portal.desktop.taglib.BaseDesktopTagSupport;
11: import com.sun.portal.desktop.taglib.DesktopTaglibException;
12: import com.sun.portal.providers.ProviderException;
13: import com.sun.portal.providers.containers.jsp.table.JSPTableContainerProvider;
14:
15: import java.util.Map;
16: import java.util.HashMap;
17:
18: public class GetChannelsInCategoryTag extends BaseDesktopTagSupport {
19: private String m_category = null;
20:
21: public void setCategory(String category)
22: throws DesktopTaglibException {
23: m_category = resolveParameter(category).toString();
24: }
25:
26: public int doStartTag() throws JspException {
27: JSPTableContainerProvider tcp = (JSPTableContainerProvider) getCurrentObj();
28: Map result = null;
29: try {
30: result = tcp.getChannelsInCategory(m_category);
31: } catch (ProviderException pe) {
32: throw new DesktopTaglibException(pe);
33: }
34: if (result == null) {
35: result = new HashMap();
36: }
37: processResult(result);
38: return SKIP_BODY;
39: }
40:
41: }
|