1   /**
2    * Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
3    *
4    *
5    *
6    *
7    * The contents of this file are subject to the terms of the Liferay Enterprise
8    * Subscription License ("License"). You may not use this file except in
9    * compliance with the License. You can obtain a copy of the License by
10   * contacting Liferay, Inc. See the License for the specific language governing
11   * permissions and limitations under the License, including but not limited to
12   * distribution rights of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.taglib.ui;
24  
25  import com.liferay.portal.kernel.util.KeyValuePair;
26  import com.liferay.taglib.util.IncludeTag;
27  
28  import java.util.List;
29  
30  import javax.servlet.http.HttpServletRequest;
31  
32  /**
33   * <a href="InputMoveBoxesTag.java.html"><b><i>View Source</i></b></a>
34   *
35   * @author Brian Wing Shun Chan
36   */
37  public class InputMoveBoxesTag extends IncludeTag {
38  
39      public int doStartTag() {
40          HttpServletRequest request =
41              (HttpServletRequest)pageContext.getRequest();
42  
43          request.setAttribute("liferay-ui:input-move-boxes:cssClass", _cssClass);
44          request.setAttribute("liferay-ui:input-move-boxes:formName", _formName);
45          request.setAttribute(
46              "liferay-ui:input-move-boxes:leftTitle", _leftTitle);
47          request.setAttribute(
48              "liferay-ui:input-move-boxes:rightTitle", _rightTitle);
49          request.setAttribute(
50              "liferay-ui:input-move-boxes:leftBoxName", _leftBoxName);
51          request.setAttribute(
52              "liferay-ui:input-move-boxes:rightBoxName", _rightBoxName);
53          request.setAttribute(
54              "liferay-ui:input-move-boxes:leftOnChange", _leftOnChange);
55          request.setAttribute(
56              "liferay-ui:input-move-boxes:rightOnChange", _rightOnChange);
57          request.setAttribute(
58              "liferay-ui:input-move-boxes:leftReorder", _leftReorder);
59          request.setAttribute(
60              "liferay-ui:input-move-boxes:rightReorder", _rightReorder);
61          request.setAttribute(
62              "liferay-ui:input-move-boxes:leftList", _leftList);
63          request.setAttribute(
64              "liferay-ui:input-move-boxes:rightList", _rightList);
65  
66          return EVAL_BODY_BUFFERED;
67      }
68  
69      public void setCssClass(String cssClass) {
70          _cssClass = cssClass;
71      }
72  
73      public void setFormName(String formName) {
74          _formName = formName;
75      }
76  
77      public void setLeftTitle(String leftTitle) {
78          _leftTitle = leftTitle;
79      }
80  
81      public void setRightTitle(String rightTitle) {
82          _rightTitle = rightTitle;
83      }
84  
85      public void setLeftBoxName(String leftBoxName) {
86          _leftBoxName = leftBoxName;
87      }
88  
89      public void setRightBoxName(String rightBoxName) {
90          _rightBoxName = rightBoxName;
91      }
92  
93      public void setLeftOnChange(String leftOnChange) {
94          _leftOnChange = leftOnChange;
95      }
96  
97      public void setRightOnChange(String rightOnChange) {
98          _rightOnChange = rightOnChange;
99      }
100 
101     public void setLeftReorder(String leftReorder) {
102         _leftReorder = leftReorder;
103     }
104 
105     public void setRightReorder(String rightReorder) {
106         _rightReorder = rightReorder;
107     }
108 
109     public void setLeftList(List<KeyValuePair> leftList) {
110         _leftList = leftList;
111     }
112 
113     public void setRightList(List<KeyValuePair> rightList) {
114         _rightList = rightList;
115     }
116 
117     protected String getDefaultPage() {
118         return _PAGE;
119     }
120 
121     private static final String _PAGE =
122         "/html/taglib/ui/input_move_boxes/page.jsp";
123 
124     private String _cssClass;
125     private String _formName = "fm";
126     private String _leftTitle;
127     private String _rightTitle;
128     private String _leftBoxName;
129     private String _rightBoxName;
130     private String _leftOnChange;
131     private String _rightOnChange;
132     private String _leftReorder;
133     private String _rightReorder;
134     private List<KeyValuePair> _leftList;
135     private List<KeyValuePair> _rightList;
136 
137 }