001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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    }