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.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 void setCssClass(String cssClass) {
32          _cssClass = cssClass;
33      }
34  
35      public void setLeftBoxName(String leftBoxName) {
36          _leftBoxName = leftBoxName;
37      }
38  
39      public void setLeftList(List<KeyValuePair> leftList) {
40          _leftList = leftList;
41      }
42  
43      public void setLeftOnChange(String leftOnChange) {
44          _leftOnChange = leftOnChange;
45      }
46  
47      public void setLeftReorder(String leftReorder) {
48          _leftReorder = leftReorder;
49      }
50  
51      public void setLeftTitle(String leftTitle) {
52          _leftTitle = leftTitle;
53      }
54  
55      public void setRightBoxName(String rightBoxName) {
56          _rightBoxName = rightBoxName;
57      }
58  
59      public void setRightList(List<KeyValuePair> rightList) {
60          _rightList = rightList;
61      }
62  
63      public void setRightOnChange(String rightOnChange) {
64          _rightOnChange = rightOnChange;
65      }
66  
67      public void setRightReorder(String rightReorder) {
68          _rightReorder = rightReorder;
69      }
70  
71      public void setRightTitle(String rightTitle) {
72          _rightTitle = rightTitle;
73      }
74  
75      protected void cleanUp() {
76          _cssClass = null;
77          _leftBoxName = null;
78          _leftList = null;
79          _leftOnChange = null;
80          _leftReorder = null;
81          _leftTitle = null;
82          _rightBoxName = null;
83          _rightList = null;
84          _rightOnChange = null;
85          _rightReorder = null;
86          _rightTitle = null;
87      }
88  
89      protected String getPage() {
90          return _PAGE;
91      }
92  
93      protected void setAttributes(HttpServletRequest request) {
94          request.setAttribute("liferay-ui:input-move-boxes:cssClass", _cssClass);
95          request.setAttribute(
96              "liferay-ui:input-move-boxes:leftBoxName", _leftBoxName);
97          request.setAttribute(
98              "liferay-ui:input-move-boxes:leftList", _leftList);
99          request.setAttribute(
100             "liferay-ui:input-move-boxes:leftOnChange", _leftOnChange);
101         request.setAttribute(
102             "liferay-ui:input-move-boxes:leftReorder", _leftReorder);
103         request.setAttribute(
104             "liferay-ui:input-move-boxes:leftTitle", _leftTitle);
105         request.setAttribute(
106             "liferay-ui:input-move-boxes:rightBoxName", _rightBoxName);
107         request.setAttribute(
108             "liferay-ui:input-move-boxes:rightList", _rightList);
109         request.setAttribute(
110             "liferay-ui:input-move-boxes:rightOnChange", _rightOnChange);
111         request.setAttribute(
112             "liferay-ui:input-move-boxes:rightReorder", _rightReorder);
113         request.setAttribute(
114             "liferay-ui:input-move-boxes:rightTitle", _rightTitle);
115     }
116 
117     private static final String _PAGE =
118         "/html/taglib/ui/input_move_boxes/page.jsp";
119 
120     private String _cssClass;
121     private String _leftBoxName;
122     private List<KeyValuePair> _leftList;
123     private String _leftOnChange;
124     private String _leftReorder;
125     private String _leftTitle;
126     private String _rightBoxName;
127     private List<KeyValuePair> _rightList;
128     private String _rightOnChange;
129     private String _rightReorder;
130     private String _rightTitle;
131 
132 }