1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.taglib.ui;
16  
17  import com.liferay.portal.kernel.util.StringPool;
18  import com.liferay.taglib.util.IncludeTag;
19  
20  import javax.servlet.http.HttpServletRequest;
21  
22  /**
23   * <a href="InputTextAreaTag.java.html"><b><i>View Source</i></b></a>
24   *
25   * @author Brian Wing Shun Chan
26   */
27  public class InputTextAreaTag extends IncludeTag {
28  
29      public void setCssClass(String cssClass) {
30          _cssClass = cssClass;
31      }
32  
33      public void setDefaultValue(String defaultValue) {
34          _defaultValue = defaultValue;
35      }
36  
37      public void setDisabled(boolean disabled) {
38          _disabled = disabled;
39      }
40  
41      public void setParam(String param) {
42          _param = param;
43      }
44  
45      protected void cleanUp() {
46          _cssClass = null;
47          _defaultValue = StringPool.BLANK;
48          _disabled = false;
49          _param = null;
50      }
51  
52      protected String getPage() {
53          return _PAGE;
54      }
55  
56      protected void setAttributes(HttpServletRequest request) {
57          request.setAttribute("liferay-ui:input-textarea:cssClass", _cssClass);
58          request.setAttribute(
59              "liferay-ui:input-textarea:defaultValue", _defaultValue);
60          request.setAttribute(
61              "liferay-ui:input-textarea:disabled", String.valueOf(_disabled));
62          request.setAttribute("liferay-ui:input-textarea:param", _param);
63      }
64  
65      private static final String _PAGE =
66          "/html/taglib/ui/input_textarea/page.jsp";
67  
68      private String _cssClass;
69      private String _defaultValue = StringPool.BLANK;
70      private boolean _disabled;
71      private String _param;
72  
73  }