1   /**
2    * Copyright (c) 2000-2007 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions 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.taglib.util.IncludeTag;
26  
27  import java.util.List;
28  
29  import javax.servlet.ServletRequest;
30  
31  /**
32   * <a href="InputMoveBoxesTag.java.html"><b><i>View Source</i></b></a>
33   *
34   * @author Brian Wing Shun Chan
35   *
36   */
37  public class InputMoveBoxesTag extends IncludeTag {
38  
39      public int doStartTag() {
40          ServletRequest req = pageContext.getRequest();
41  
42          req.setAttribute("liferay-ui:input-move-boxes:formName", _formName);
43          req.setAttribute("liferay-ui:input-move-boxes:leftTitle", _leftTitle);
44          req.setAttribute("liferay-ui:input-move-boxes:rightTitle", _rightTitle);
45          req.setAttribute(
46              "liferay-ui:input-move-boxes:leftBoxName", _leftBoxName);
47          req.setAttribute(
48              "liferay-ui:input-move-boxes:rightBoxName", _rightBoxName);
49          req.setAttribute(
50              "liferay-ui:input-move-boxes:leftOnChange", _leftOnChange);
51          req.setAttribute(
52              "liferay-ui:input-move-boxes:rightOnChange", _rightOnChange);
53          req.setAttribute(
54              "liferay-ui:input-move-boxes:leftReorder", _leftReorder);
55          req.setAttribute(
56              "liferay-ui:input-move-boxes:rightReorder", _rightReorder);
57          req.setAttribute("liferay-ui:input-move-boxes:leftList", _leftList);
58          req.setAttribute("liferay-ui:input-move-boxes:rightList", _rightList);
59  
60          return EVAL_BODY_BUFFERED;
61      }
62  
63      public void setFormName(String formName) {
64          _formName = formName;
65      }
66  
67      public void setLeftTitle(String leftTitle) {
68          _leftTitle = leftTitle;
69      }
70  
71      public void setRightTitle(String rightTitle) {
72          _rightTitle = rightTitle;
73      }
74  
75      public void setLeftBoxName(String leftBoxName) {
76          _leftBoxName = leftBoxName;
77      }
78  
79      public void setRightBoxName(String rightBoxName) {
80          _rightBoxName = rightBoxName;
81      }
82  
83      public void setLeftOnChange(String leftOnChange) {
84          _leftOnChange = leftOnChange;
85      }
86  
87      public void setRightOnChange(String rightOnChange) {
88          _rightOnChange = rightOnChange;
89      }
90  
91      public void setLeftReorder(String leftReorder) {
92          _leftReorder = leftReorder;
93      }
94  
95      public void setRightReorder(String rightReorder) {
96          _rightReorder = rightReorder;
97      }
98  
99      public void setLeftList(List leftList) {
100         _leftList = leftList;
101     }
102 
103     public void setRightList(List rightList) {
104         _rightList = rightList;
105     }
106 
107     protected String getDefaultPage() {
108         return _PAGE;
109     }
110 
111     private static final String _PAGE =
112         "/html/taglib/ui/input_move_boxes/page.jsp";
113 
114     private String _formName = "fm";
115     private String _leftTitle;
116     private String _rightTitle;
117     private String _leftBoxName;
118     private String _rightBoxName;
119     private String _leftOnChange;
120     private String _rightOnChange;
121     private String _leftReorder;
122     private String _rightReorder;
123     private List _leftList;
124     private List _rightList;
125 
126 }