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.portal.kernel.util.KeyValuePair;
18  import com.liferay.taglib.util.IncludeTag;
19  
20  import java.util.List;
21  
22  import javax.servlet.http.HttpServletRequest;
23  
24  /**
25   * <a href="InputMoveBoxesTag.java.html"><b><i>View Source</i></b></a>
26   *
27   * @author Brian Wing Shun Chan
28   */
29  public class InputMoveBoxesTag extends IncludeTag {
30  
31      public int doStartTag() {
32          HttpServletRequest request =
33              (HttpServletRequest)pageContext.getRequest();
34  
35          request.setAttribute("liferay-ui:input-move-boxes:cssClass", _cssClass);
36          request.setAttribute("liferay-ui:input-move-boxes:formName", _formName);
37          request.setAttribute(
38              "liferay-ui:input-move-boxes:leftTitle", _leftTitle);
39          request.setAttribute(
40              "liferay-ui:input-move-boxes:rightTitle", _rightTitle);
41          request.setAttribute(
42              "liferay-ui:input-move-boxes:leftBoxName", _leftBoxName);
43          request.setAttribute(
44              "liferay-ui:input-move-boxes:rightBoxName", _rightBoxName);
45          request.setAttribute(
46              "liferay-ui:input-move-boxes:leftOnChange", _leftOnChange);
47          request.setAttribute(
48              "liferay-ui:input-move-boxes:rightOnChange", _rightOnChange);
49          request.setAttribute(
50              "liferay-ui:input-move-boxes:leftReorder", _leftReorder);
51          request.setAttribute(
52              "liferay-ui:input-move-boxes:rightReorder", _rightReorder);
53          request.setAttribute(
54              "liferay-ui:input-move-boxes:leftList", _leftList);
55          request.setAttribute(
56              "liferay-ui:input-move-boxes:rightList", _rightList);
57  
58          return EVAL_BODY_BUFFERED;
59      }
60  
61      public void setCssClass(String cssClass) {
62          _cssClass = cssClass;
63      }
64  
65      public void setFormName(String formName) {
66          _formName = formName;
67      }
68  
69      public void setLeftTitle(String leftTitle) {
70          _leftTitle = leftTitle;
71      }
72  
73      public void setRightTitle(String rightTitle) {
74          _rightTitle = rightTitle;
75      }
76  
77      public void setLeftBoxName(String leftBoxName) {
78          _leftBoxName = leftBoxName;
79      }
80  
81      public void setRightBoxName(String rightBoxName) {
82          _rightBoxName = rightBoxName;
83      }
84  
85      public void setLeftOnChange(String leftOnChange) {
86          _leftOnChange = leftOnChange;
87      }
88  
89      public void setRightOnChange(String rightOnChange) {
90          _rightOnChange = rightOnChange;
91      }
92  
93      public void setLeftReorder(String leftReorder) {
94          _leftReorder = leftReorder;
95      }
96  
97      public void setRightReorder(String rightReorder) {
98          _rightReorder = rightReorder;
99      }
100 
101     public void setLeftList(List<KeyValuePair> leftList) {
102         _leftList = leftList;
103     }
104 
105     public void setRightList(List<KeyValuePair> rightList) {
106         _rightList = rightList;
107     }
108 
109     protected String getDefaultPage() {
110         return _PAGE;
111     }
112 
113     private static final String _PAGE =
114         "/html/taglib/ui/input_move_boxes/page.jsp";
115 
116     private String _cssClass;
117     private String _formName = "fm";
118     private String _leftTitle;
119     private String _rightTitle;
120     private String _leftBoxName;
121     private String _rightBoxName;
122     private String _leftOnChange;
123     private String _rightOnChange;
124     private String _leftReorder;
125     private String _rightReorder;
126     private List<KeyValuePair> _leftList;
127     private List<KeyValuePair> _rightList;
128 
129 }