📄 inputtransferselect.java
字号:
// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space
// Source File Name: InputTransferSelect.java
package org.apache.struts2.components;
import com.opensymphony.xwork2.util.ValueStack;
import java.util.LinkedHashMap;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
// Referenced classes of package org.apache.struts2.components:
// ListUIBean, Form
public class InputTransferSelect extends ListUIBean
{
private static final Log _log = LogFactory.getLog(org/apache/struts2/components/InputTransferSelect);
private static final String TEMPLATE = "inputtransferselect";
protected String size;
protected String multiple;
protected String allowRemoveAll;
protected String allowUpDown;
protected String leftTitle;
protected String rightTitle;
protected String buttonCssClass;
protected String buttonCssStyle;
protected String addLabel;
protected String removeLabel;
protected String removeAllLabel;
protected String upLabel;
protected String downLabel;
protected String headerKey;
protected String headerValue;
public InputTransferSelect(ValueStack stack, HttpServletRequest request, HttpServletResponse response)
{
super(stack, request, response);
}
protected String getDefaultTemplate()
{
return "inputtransferselect";
}
public void evaluateExtraParams()
{
super.evaluateExtraParams();
if (size == null || size.trim().length() <= 0)
addParameter("size", "5");
if (multiple == null || multiple.trim().length() <= 0)
addParameter("multiple", Boolean.TRUE);
addParameter("allowUpDown", allowUpDown == null ? ((Object) (Boolean.TRUE)) : findValue(allowUpDown, java/lang/Boolean));
addParameter("allowRemoveAll", allowRemoveAll == null ? ((Object) (Boolean.TRUE)) : findValue(allowRemoveAll, java/lang/Boolean));
if (leftTitle != null)
addParameter("leftTitle", findValue(leftTitle, java/lang/String));
if (rightTitle != null)
addParameter("rightTitle", findValue(rightTitle, java/lang/String));
if (buttonCssClass != null && buttonCssClass.trim().length() > 0)
addParameter("buttonCssClass", buttonCssClass);
if (buttonCssStyle != null && buttonCssStyle.trim().length() > 0)
addParameter("buttonCssStyle", buttonCssStyle);
addParameter("addLabel", addLabel == null ? "->" : findValue(addLabel, java/lang/String));
addParameter("removeLabel", removeLabel == null ? "<-" : findValue(removeLabel, java/lang/String));
addParameter("removeAllLabel", removeAllLabel == null ? "<<--" : findValue(removeAllLabel, java/lang/String));
addParameter("upLabel", upLabel == null ? "^" : findValue(upLabel, java/lang/String));
addParameter("downLabel", downLabel == null ? "v" : findValue(downLabel, java/lang/String));
if (headerKey != null && headerValue != null)
{
addParameter("headerKey", findString(headerKey));
addParameter("headerValue", findString(headerValue));
}
Form formAncestor = (Form)findAncestor(org/apache/struts2/components/Form);
if (formAncestor != null)
{
enableAncestorFormCustomOnsubmit();
Map formInputtransferselectIds = (Map)formAncestor.getParameters().get("inputtransferselectIds");
if (formInputtransferselectIds == null)
formInputtransferselectIds = new LinkedHashMap();
String tmpId = (String)getParameters().get("id");
String tmpHeaderKey = (String)getParameters().get("headerKey");
if (tmpId != null && !formInputtransferselectIds.containsKey(tmpId))
formInputtransferselectIds.put(tmpId, tmpHeaderKey);
formAncestor.getParameters().put("inputtransferselectIds", formInputtransferselectIds);
} else
{
_log.warn((new StringBuilder()).append("form enclosing inputtransferselect ").append(this).append(" not found, auto select upon form submit of inputtransferselect will not work").toString());
}
}
public String getSize()
{
return size;
}
public void setSize(String size)
{
this.size = size;
}
public String getMultiple()
{
return multiple;
}
public void setMultiple(String multiple)
{
this.multiple = multiple;
}
public String getAllowRemoveAll()
{
return allowRemoveAll;
}
public void setAllowRemoveAll(String allowRemoveAll)
{
this.allowRemoveAll = allowRemoveAll;
}
public String getAllowUpDown()
{
return allowUpDown;
}
public void setAllowUpDown(String allowUpDown)
{
this.allowUpDown = allowUpDown;
}
public String getLeftTitle()
{
return leftTitle;
}
public void setLeftTitle(String leftTitle)
{
this.leftTitle = leftTitle;
}
public String getRightTitle()
{
return rightTitle;
}
public void setRightTitle(String rightTitle)
{
this.rightTitle = rightTitle;
}
public String getButtonCssClass()
{
return buttonCssClass;
}
public void setButtonCssClass(String buttonCssClass)
{
this.buttonCssClass = buttonCssClass;
}
public String getButtonCssStyle()
{
return buttonCssStyle;
}
public void setButtonCssStyle(String buttonCssStyle)
{
this.buttonCssStyle = buttonCssStyle;
}
public String getAddLabel()
{
return addLabel;
}
public void setAddLabel(String addLabel)
{
this.addLabel = addLabel;
}
public String getRemoveLabel()
{
return removeLabel;
}
public void setRemoveLabel(String removeLabel)
{
this.removeLabel = removeLabel;
}
public String getRemoveAllLabel()
{
return removeAllLabel;
}
public void setRemoveAllLabel(String removeAllLabel)
{
this.removeAllLabel = removeAllLabel;
}
public String getUpLabel()
{
return upLabel;
}
public void setUpLabel(String upLabel)
{
this.upLabel = upLabel;
}
public String getDownLabel()
{
return downLabel;
}
public void setDownLabel(String downLabel)
{
this.downLabel = downLabel;
}
public String getHeaderKey()
{
return headerKey;
}
public void setHeaderKey(String headerKey)
{
this.headerKey = headerKey;
}
public String getHeaderValue()
{
return headerValue;
}
public void setHeaderValue(String headerValue)
{
this.headerValue = headerValue;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -