001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.taglib.ui;
022:
023: import com.liferay.taglib.util.IncludeTag;
024:
025: import java.util.List;
026:
027: import javax.servlet.ServletRequest;
028:
029: /**
030: * <a href="InputMoveBoxesTag.java.html"><b><i>View Source</i></b></a>
031: *
032: * @author Brian Wing Shun Chan
033: *
034: */
035: public class InputMoveBoxesTag extends IncludeTag {
036:
037: public int doStartTag() {
038: ServletRequest req = pageContext.getRequest();
039:
040: req.setAttribute("liferay-ui:input-move-boxes:formName",
041: _formName);
042: req.setAttribute("liferay-ui:input-move-boxes:leftTitle",
043: _leftTitle);
044: req.setAttribute("liferay-ui:input-move-boxes:rightTitle",
045: _rightTitle);
046: req.setAttribute("liferay-ui:input-move-boxes:leftBoxName",
047: _leftBoxName);
048: req.setAttribute("liferay-ui:input-move-boxes:rightBoxName",
049: _rightBoxName);
050: req.setAttribute("liferay-ui:input-move-boxes:leftOnChange",
051: _leftOnChange);
052: req.setAttribute("liferay-ui:input-move-boxes:rightOnChange",
053: _rightOnChange);
054: req.setAttribute("liferay-ui:input-move-boxes:leftReorder",
055: _leftReorder);
056: req.setAttribute("liferay-ui:input-move-boxes:rightReorder",
057: _rightReorder);
058: req.setAttribute("liferay-ui:input-move-boxes:leftList",
059: _leftList);
060: req.setAttribute("liferay-ui:input-move-boxes:rightList",
061: _rightList);
062:
063: return EVAL_BODY_BUFFERED;
064: }
065:
066: public void setFormName(String formName) {
067: _formName = formName;
068: }
069:
070: public void setLeftTitle(String leftTitle) {
071: _leftTitle = leftTitle;
072: }
073:
074: public void setRightTitle(String rightTitle) {
075: _rightTitle = rightTitle;
076: }
077:
078: public void setLeftBoxName(String leftBoxName) {
079: _leftBoxName = leftBoxName;
080: }
081:
082: public void setRightBoxName(String rightBoxName) {
083: _rightBoxName = rightBoxName;
084: }
085:
086: public void setLeftOnChange(String leftOnChange) {
087: _leftOnChange = leftOnChange;
088: }
089:
090: public void setRightOnChange(String rightOnChange) {
091: _rightOnChange = rightOnChange;
092: }
093:
094: public void setLeftReorder(String leftReorder) {
095: _leftReorder = leftReorder;
096: }
097:
098: public void setRightReorder(String rightReorder) {
099: _rightReorder = rightReorder;
100: }
101:
102: public void setLeftList(List leftList) {
103: _leftList = leftList;
104: }
105:
106: public void setRightList(List rightList) {
107: _rightList = rightList;
108: }
109:
110: protected String getDefaultPage() {
111: return _PAGE;
112: }
113:
114: private static final String _PAGE = "/html/taglib/ui/input_move_boxes/page.jsp";
115:
116: private String _formName = "fm";
117: private String _leftTitle;
118: private String _rightTitle;
119: private String _leftBoxName;
120: private String _rightBoxName;
121: private String _leftOnChange;
122: private String _rightOnChange;
123: private String _leftReorder;
124: private String _rightReorder;
125: private List _leftList;
126: private List _rightList;
127:
128: }
|