001: /*
002: * $Id: InputTransferSelectTag.java 502296 2007-02-01 17:33:39Z niallp $
003: *
004: * Licensed to the Apache Software Foundation (ASF) under one
005: * or more contributor license agreements. See the NOTICE file
006: * distributed with this work for additional information
007: * regarding copyright ownership. The ASF licenses this file
008: * to you under the Apache License, Version 2.0 (the
009: * "License"); you may not use this file except in compliance
010: * with the License. You may obtain a copy of the License at
011: *
012: * http://www.apache.org/licenses/LICENSE-2.0
013: *
014: * Unless required by applicable law or agreed to in writing,
015: * software distributed under the License is distributed on an
016: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
017: * KIND, either express or implied. See the License for the
018: * specific language governing permissions and limitations
019: * under the License.
020: */
021: package org.apache.struts2.views.jsp.ui;
022:
023: import org.apache.struts2.components.Component;
024: import org.apache.struts2.components.InputTransferSelect;
025: import com.opensymphony.xwork2.util.ValueStack;
026:
027: import javax.servlet.http.HttpServletRequest;
028: import javax.servlet.http.HttpServletResponse;
029:
030: /**
031: * InputTransferSelect jsp tag.
032: */
033: public class InputTransferSelectTag extends AbstractListTag {
034:
035: private static final long serialVersionUID = 250474334495763536L;
036:
037: protected String size;
038: protected String multiple;
039:
040: protected String allowRemoveAll;
041: protected String allowUpDown;
042:
043: protected String leftTitle;
044: protected String rightTitle;
045:
046: protected String buttonCssClass;
047: protected String buttonCssStyle;
048:
049: protected String addLabel;
050: protected String removeLabel;
051: protected String removeAllLabel;
052: protected String upLabel;
053: protected String downLabel;
054:
055: protected String headerKey;
056: protected String headerValue;
057:
058: public Component getBean(ValueStack stack, HttpServletRequest req,
059: HttpServletResponse res) {
060: return new InputTransferSelect(stack, req, res);
061: }
062:
063: protected void populateParams() {
064: super .populateParams();
065:
066: InputTransferSelect inputTransferSelect = (InputTransferSelect) component;
067: inputTransferSelect.setSize(size);
068: inputTransferSelect.setMultiple(multiple);
069: inputTransferSelect.setAllowRemoveAll(allowRemoveAll);
070: inputTransferSelect.setAllowUpDown(allowUpDown);
071: inputTransferSelect.setLeftTitle(leftTitle);
072: inputTransferSelect.setRightTitle(rightTitle);
073:
074: inputTransferSelect.setButtonCssClass(buttonCssClass);
075: inputTransferSelect.setButtonCssStyle(buttonCssStyle);
076:
077: inputTransferSelect.setAddLabel(addLabel);
078: inputTransferSelect.setRemoveLabel(removeLabel);
079: inputTransferSelect.setRemoveAllLabel(removeAllLabel);
080: inputTransferSelect.setUpLabel(upLabel);
081: inputTransferSelect.setDownLabel(downLabel);
082: inputTransferSelect.setHeaderKey(headerKey);
083: inputTransferSelect.setHeaderValue(headerValue);
084: }
085:
086: public String getSize() {
087: return size;
088: }
089:
090: public void setSize(String size) {
091: this .size = size;
092: }
093:
094: public String getMultiple() {
095: return multiple;
096: }
097:
098: public void setMultiple(String multiple) {
099: this .multiple = multiple;
100: }
101:
102: public String getAllowRemoveAll() {
103: return allowRemoveAll;
104: }
105:
106: public void setAllowRemoveAll(String allowRemoveAll) {
107: this .allowRemoveAll = allowRemoveAll;
108: }
109:
110: public String getAllowUpDown() {
111: return allowUpDown;
112: }
113:
114: public void setAllowUpDown(String allowUpDown) {
115: this .allowUpDown = allowUpDown;
116: }
117:
118: public String getLeftTitle() {
119: return leftTitle;
120: }
121:
122: public void setLeftTitle(String leftTitle) {
123: this .leftTitle = leftTitle;
124: }
125:
126: public String getRightTitle() {
127: return rightTitle;
128: }
129:
130: public void setRightTitle(String rightTitle) {
131: this .rightTitle = rightTitle;
132: }
133:
134: public String getButtonCssClass() {
135: return buttonCssClass;
136: }
137:
138: public void setButtonCssClass(String buttonCssClass) {
139: this .buttonCssClass = buttonCssClass;
140: }
141:
142: public String getButtonCssStyle() {
143: return buttonCssStyle;
144: }
145:
146: public void setButtonCssStyle(String buttonCssStyle) {
147: this .buttonCssStyle = buttonCssStyle;
148: }
149:
150: public String getAddLabel() {
151: return addLabel;
152: }
153:
154: public void setAddLabel(String addLabel) {
155: this .addLabel = addLabel;
156: }
157:
158: public String getRemoveLabel() {
159: return removeLabel;
160: }
161:
162: public void setRemoveLabel(String removeLabel) {
163: this .removeLabel = removeLabel;
164: }
165:
166: public String getRemoveAllLabel() {
167: return removeAllLabel;
168: }
169:
170: public void setRemoveAllLabel(String removeAllLabel) {
171: this .removeAllLabel = removeAllLabel;
172: }
173:
174: public String getUpLabel() {
175: return upLabel;
176: }
177:
178: public void setUpLabel(String upLabel) {
179: this .upLabel = upLabel;
180: }
181:
182: public String getDownLabel() {
183: return downLabel;
184: }
185:
186: public void setDownLabel(String downLabel) {
187: this .downLabel = downLabel;
188: }
189:
190: public String getHeaderKey() {
191: return headerKey;
192: }
193:
194: public void setHeaderKey(String headerKey) {
195: this .headerKey = headerKey;
196: }
197:
198: public String getHeaderValue() {
199: return headerValue;
200: }
201:
202: public void setHeaderValue(String headerValue) {
203: this.headerValue = headerValue;
204: }
205: }
|