001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.taglib.ui;
016    
017    import com.liferay.portal.kernel.util.StringPool;
018    import com.liferay.taglib.util.IncludeTag;
019    
020    import javax.servlet.http.HttpServletRequest;
021    
022    /**
023     * @author Brian Wing Shun Chan
024     */
025    public class InputTextAreaTag extends IncludeTag {
026    
027            public void setCssClass(String cssClass) {
028                    _cssClass = cssClass;
029            }
030    
031            public void setDefaultValue(String defaultValue) {
032                    _defaultValue = defaultValue;
033            }
034    
035            public void setDisabled(boolean disabled) {
036                    _disabled = disabled;
037            }
038    
039            public void setParam(String param) {
040                    _param = param;
041            }
042    
043            protected void cleanUp() {
044                    _cssClass = null;
045                    _defaultValue = StringPool.BLANK;
046                    _disabled = false;
047                    _param = null;
048            }
049    
050            protected String getPage() {
051                    return _PAGE;
052            }
053    
054            protected void setAttributes(HttpServletRequest request) {
055                    request.setAttribute("liferay-ui:input-textarea:cssClass", _cssClass);
056                    request.setAttribute(
057                            "liferay-ui:input-textarea:defaultValue", _defaultValue);
058                    request.setAttribute(
059                            "liferay-ui:input-textarea:disabled", String.valueOf(_disabled));
060                    request.setAttribute("liferay-ui:input-textarea:param", _param);
061            }
062    
063            private static final String _PAGE =
064                    "/html/taglib/ui/input_textarea/page.jsp";
065    
066            private String _cssClass;
067            private String _defaultValue = StringPool.BLANK;
068            private boolean _disabled;
069            private String _param;
070    
071    }