public class UpDownSelect extends Select
Create a Select component with buttons to move the elements in the select component up and down. When the containing form is submited, its elements will be submitted in the order they are arranged (top to bottom).
<!-- Example 1: simple example --> <s:updownselect list="#{'england':'England', 'america':'America', 'germany':'Germany'}" name="prioritisedFavouriteCountries" headerKey="-1" headerValue="--- Please Order Them Accordingly ---" emptyOption="true" /> <!-- Example 2: more complex example --> <s:updownselect list="defaultFavouriteCartoonCharacters" name="prioritisedFavouriteCartoonCharacters" headerKey="-1" headerValue="--- Please Order ---" emptyOption="true" allowMoveUp="true" allowMoveDown="true" allowSelectAll="true" moveUpLabel="Move Up" moveDownLabel="Move Down" selectAllLabel="Select All" />@s.tag name="updownselect" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.ui.UpDownSelectTag" description="Render a up down select element"
Modifier and Type | Field and Description |
---|---|
protected String |
allowMoveDown |
protected String |
allowMoveUp |
protected String |
allowSelectAll |
protected String |
moveDownLabel |
protected String |
moveUpLabel |
protected String |
selectAllLabel |
static String |
TEMPLATE |
emptyOption, headerKey, headerValue, multiple, size
list, listCssClass, listCssStyle, listKey, listLabelKey, listTitle, listValue, listValueKey, throwExceptionOnNullValueAttribute
accesskey, cssClass, cssErrorClass, cssErrorStyle, cssStyle, defaultTemplateDir, defaultUITheme, disabled, dynamicAttributes, errorPosition, id, javascriptTooltip, key, label, labelPosition, labelSeparator, name, onblur, onchange, onclick, ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onselect, request, requiredLabel, requiredPosition, response, tabindex, template, templateDir, templateEngineManager, templateSuffix, theme, title, tooltip, tooltipConfig, tooltipCssClass, tooltipDelay, tooltipIconPath, uiThemeExpansionToken, value
actionMapper, COMPONENT_STACK, devMode, parameters, stack, standardAttributesMap, throwExceptionOnELFailure
Constructor and Description |
---|
UpDownSelect(ValueStack stack,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
Modifier and Type | Method and Description |
---|---|
void |
evaluateParams() |
String |
getAllowMoveDown() |
String |
getAllowMoveUp() |
String |
getAllowSelectAll() |
String |
getDefaultTemplate()
A contract that requires each concrete UI Tag to specify which template should be used as a default.
|
String |
getMoveDownLabel() |
String |
getMoveUpLabel() |
String |
getSelectAllLabel() |
void |
setAllowMoveDown(String allowMoveDown) |
void |
setAllowMoveUp(String allowMoveUp) |
void |
setAllowSelectAll(String allowSelectAll) |
void |
setMoveDownLabel(String moveDownLabel) |
void |
setMoveUpLabel(String moveUpLabel) |
void |
setSelectAllLabel(String selectAllLabel) |
evaluateExtraParams, setEmptyOption, setHeaderKey, setHeaderValue, setMultiple, setSize
contains, getValueClassType, setList, setListCssClass, setListCssStyle, setListKey, setListLabelKey, setListTitle, setListValue, setListValueKey, setThrowExceptionOnNullValueAttribute
addFormParameter, buildTemplateName, copyParams, enableAncestorFormCustomOnsubmit, end, ensureAttributeSafelyNotEscaped, escape, evaluateNameValue, getId, getTemplate, getTemplateDir, getTheme, getTooltipConfig, mergeTemplate, populateComponentHtmlId, setAccesskey, setClass, setCssClass, setCssErrorClass, setCssErrorStyle, setCssStyle, setDefaultTemplateDir, setDefaultUITheme, setDisabled, setDynamicAttributes, setErrorPosition, setId, setJavascriptTooltip, setKey, setLabel, setLabelposition, setLabelSeparator, setName, setOnblur, setOnchange, setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnselect, setRequiredLabel, setRequiredPosition, setStyle, setTabindex, setTemplate, setTemplateDir, setTemplateEngineManager, setTheme, setTitle, setTooltip, setTooltipConfig, setTooltipCssClass, setTooltipDelay, setTooltipIconPath, setUIThemeExpansionToken, setValue
addAllParameters, addParameter, altSyntax, completeExpressionIfAltSyntax, determineActionURL, determineNamespace, end, escapeHtmlBody, fieldError, findAncestor, findString, findString, findStringIfAltSyntax, findValue, findValue, findValue, getComponentStack, getParameters, getStack, getStandardAttributes, isValidTagAttribute, popComponentStack, setActionMapper, setDevMode, setThrowExceptionsOnELFailure, setUrlHelper, start, stripExpressionIfAltSyntax, toString, usesBody
public static final String TEMPLATE
protected String allowMoveUp
protected String allowMoveDown
protected String allowSelectAll
protected String moveUpLabel
protected String moveDownLabel
protected String selectAllLabel
public UpDownSelect(ValueStack stack, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
public String getDefaultTemplate()
UIBean
getDefaultTemplate
in class Select
public void evaluateParams()
evaluateParams
in class UIBean
public String getAllowMoveUp()
public void setAllowMoveUp(String allowMoveUp)
public String getAllowMoveDown()
public void setAllowMoveDown(String allowMoveDown)
public String getAllowSelectAll()
public void setAllowSelectAll(String allowSelectAll)
public String getMoveUpLabel()
public void setMoveUpLabel(String moveUpLabel)
public String getMoveDownLabel()
public void setMoveDownLabel(String moveDownLabel)
public String getSelectAllLabel()
public void setSelectAllLabel(String selectAllLabel)
Copyright © 2000–2020 Apache Software Foundation. All rights reserved.