001: /*
002: * $Id: UpDownSelectTag.java 471756 2006-11-06 15:01:43Z husted $
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 javax.servlet.http.HttpServletRequest;
024: import javax.servlet.http.HttpServletResponse;
025:
026: import org.apache.struts2.components.Component;
027: import org.apache.struts2.components.UpDownSelect;
028:
029: import com.opensymphony.xwork2.util.ValueStack;
030:
031: /**
032: * @see UpDownSelect
033: */
034: public class UpDownSelectTag extends SelectTag {
035:
036: private static final long serialVersionUID = -8136573053799541353L;
037:
038: protected String allowMoveUp;
039: protected String allowMoveDown;
040: protected String allowSelectAll;
041:
042: protected String moveUpLabel;
043: protected String moveDownLabel;
044: protected String selectAllLabel;
045:
046: public Component getBean(ValueStack stack, HttpServletRequest req,
047: HttpServletResponse res) {
048: return new UpDownSelect(stack, req, res);
049: }
050:
051: protected void populateParams() {
052: super .populateParams();
053:
054: UpDownSelect c = (UpDownSelect) component;
055:
056: c.setAllowMoveUp(allowMoveUp);
057: c.setAllowMoveDown(allowMoveDown);
058: c.setAllowSelectAll(allowSelectAll);
059:
060: c.setMoveUpLabel(moveUpLabel);
061: c.setMoveDownLabel(moveDownLabel);
062: c.setSelectAllLabel(selectAllLabel);
063:
064: }
065:
066: public String getAllowMoveUp() {
067: return allowMoveUp;
068: }
069:
070: public void setAllowMoveUp(String allowMoveUp) {
071: this .allowMoveUp = allowMoveUp;
072: }
073:
074: public String getAllowMoveDown() {
075: return allowMoveDown;
076: }
077:
078: public void setAllowMoveDown(String allowMoveDown) {
079: this .allowMoveDown = allowMoveDown;
080: }
081:
082: public String getAllowSelectAll() {
083: return allowSelectAll;
084: }
085:
086: public void setAllowSelectAll(String allowSelectAll) {
087: this .allowSelectAll = allowSelectAll;
088: }
089:
090: public String getMoveUpLabel() {
091: return moveUpLabel;
092: }
093:
094: public void setMoveUpLabel(String moveUpLabel) {
095: this .moveUpLabel = moveUpLabel;
096: }
097:
098: public String getMoveDownLabel() {
099: return moveDownLabel;
100: }
101:
102: public void setMoveDownLabel(String moveDownLabel) {
103: this .moveDownLabel = moveDownLabel;
104: }
105:
106: public String getSelectAllLabel() {
107: return selectAllLabel;
108: }
109:
110: public void setSelectAllLabel(String selectAllLabel) {
111: this.selectAllLabel = selectAllLabel;
112: }
113: }
|