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.provider;
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.Provider;
12: import com.sun.portal.providers.ProviderException;
13:
14: import com.sun.portal.desktop.util.Integers;
15:
16: public class GetWidthTag extends BaseDesktopTagSupport {
17: public int doStartTag() throws JspException {
18: Provider p = (Provider) getCurrentObj();
19: int width = 0;
20: try {
21: width = p.getWidth();
22: } catch (Throwable t) {
23: return processException(new DesktopTaglibException(t),
24: new Integer(-1));
25: }
26: processResult(Integers.get(width));
27: return SKIP_BODY;
28: }
29: }
|