1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.taglib.ui;
16  
17  import com.liferay.taglib.util.IncludeTag;
18  
19  import javax.servlet.http.HttpServletRequest;
20  
21  /**
22   * <a href="InputEditorTag.java.html"><b><i>View Source</i></b></a>
23   *
24   * @author Brian Wing Shun Chan
25   */
26  public class InputEditorTag extends IncludeTag {
27  
28      public int doStartTag() {
29          HttpServletRequest request =
30              (HttpServletRequest)pageContext.getRequest();
31  
32          request.setAttribute("liferay-ui:input-editor:cssClass", _cssClass);
33          request.setAttribute("liferay-ui:input-editor:name", _name);
34          request.setAttribute("liferay-ui:input-editor:editorImpl", _editorImpl);
35          request.setAttribute("liferay-ui:input-editor:toolbarSet", _toolbarSet);
36          request.setAttribute("liferay-ui:input-editor:initMethod", _initMethod);
37          request.setAttribute(
38              "liferay-ui:input-editor:onChangeMethod", _onChangeMethod);
39          request.setAttribute("liferay-ui:input-editor:height", _height);
40          request.setAttribute("liferay-ui:input-editor:width", _width);
41  
42          return EVAL_BODY_BUFFERED;
43      }
44  
45      public void setCssClass(String cssClass) {
46          _cssClass = cssClass;
47      }
48  
49      public void setName(String name) {
50          _name = name;
51      }
52  
53      public void setEditorImpl(String editorImpl) {
54          _editorImpl = editorImpl;
55      }
56  
57      public void setToolbarSet(String toolbarSet) {
58          _toolbarSet = toolbarSet;
59      }
60  
61      public void setInitMethod(String initMethod) {
62          _initMethod = initMethod;
63      }
64  
65      public void setOnChangeMethod(String onChangeMethod) {
66          _onChangeMethod = onChangeMethod;
67      }
68  
69      public void setHeight(String height) {
70          _height = height;
71      }
72  
73      public void setWidth(String width) {
74          _width = width;
75      }
76  
77      protected String getDefaultPage() {
78          return _PAGE;
79      }
80  
81      private static final String _PAGE = "/html/taglib/ui/input_editor/page.jsp";
82  
83      private String _cssClass;
84      private String _name;
85      private String _editorImpl;
86      private String _toolbarSet;
87      private String _initMethod;
88      private String _onChangeMethod;
89      private String _height;
90      private String _width;
91  
92  }