Package org.apache.struts2.components
Class UpDownSelect
java.lang.Object
org.apache.struts2.components.Component
org.apache.struts2.components.UIBean
org.apache.struts2.components.ListUIBean
org.apache.struts2.components.Select
org.apache.struts2.components.UpDownSelect
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"-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringstatic final StringFields inherited from class org.apache.struts2.components.Select
emptyOption, headerKey, headerValue, multiple, sizeFields inherited from class org.apache.struts2.components.ListUIBean
list, listCssClass, listCssStyle, listKey, listLabelKey, listTitle, listValue, listValueKey, throwExceptionOnNullValueAttributeFields inherited from class org.apache.struts2.components.UIBean
accesskey, ATTR_FIELD_VALUE, ATTR_NAME_VALUE, ATTR_VALUE, 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, uiStaticContentPath, uiThemeExpansionToken, valueFields inherited from class org.apache.struts2.components.Component
actionMapper, attributes, COMPONENT_STACK, devMode, escapeHtmlBody, performClearTagStateForTagPoolingServers, stack, standardAttributesMap, throwExceptionOnELFailure -
Constructor Summary
ConstructorsConstructorDescriptionUpDownSelect(ValueStack stack, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) -
Method Summary
Modifier and TypeMethodDescriptionvoidA contract that requires each concrete UI Tag to specify which template should be used as a default.voidsetAllowMoveDown(String allowMoveDown) voidsetAllowMoveUp(String allowMoveUp) voidsetAllowSelectAll(String allowSelectAll) voidsetMoveDownLabel(String moveDownLabel) voidsetMoveUpLabel(String moveUpLabel) voidsetSelectAllLabel(String selectAllLabel) Methods inherited from class org.apache.struts2.components.Select
evaluateExtraParams, setEmptyOption, setHeaderKey, setHeaderValue, setMultiple, setSizeMethods inherited from class org.apache.struts2.components.ListUIBean
contains, getValueClassType, setList, setListCssClass, setListCssStyle, setListKey, setListLabelKey, setListTitle, setListValue, setListValueKey, setThrowExceptionOnNullValueAttributeMethods inherited from class org.apache.struts2.components.UIBean
addFormParameter, applyValueParameter, buildTemplateName, copyAttributes, enableAncestorFormCustomOnsubmit, end, ensureAttributeSafelyNotEscaped, escape, evaluateNameValue, getId, getTemplate, getTemplateDir, getTheme, getTooltipConfig, lazyEvaluation, mergeTemplate, populateComponentHtmlId, setAccesskey, 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, setStaticContentPath, setStyle, setTabindex, setTemplate, setTemplateDir, setTemplateEngineManager, setTheme, setTitle, setTooltip, setTooltipConfig, setTooltipCssClass, setTooltipDelay, setTooltipIconPath, setUIThemeExpansionToken, setValueMethods inherited from class org.apache.struts2.components.Component
addAllAttributes, addParameter, completeExpression, determineActionURL, determineNamespace, end, escapeHtmlBody, fieldError, findAncestor, findString, findString, findValue, findValue, findValue, getAttributes, getComponentStack, getNamespace, getPerformClearTagStateForTagPoolingServers, getStack, getStandardAttributes, isAcceptableExpression, isValidTagAttribute, popComponentStack, setActionMapper, setDevMode, setEscapeHtmlBody, setNotExcludedAcceptedPatterns, setPerformClearTagStateForTagPoolingServers, setThrowExceptionsOnELFailure, setUrlHelper, start, stripExpression, toString, usesBody
-
Field Details
-
TEMPLATE
- See Also:
-
allowMoveUp
-
allowMoveDown
-
allowSelectAll
-
moveUpLabel
-
moveDownLabel
-
selectAllLabel
-
-
Constructor Details
-
UpDownSelect
public UpDownSelect(ValueStack stack, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
-
-
Method Details
-
getDefaultTemplate
Description copied from class:UIBeanA contract that requires each concrete UI Tag to specify which template should be used as a default. For example, the CheckboxTab might return "checkbox.vm" while the RadioTag might return "radio.vm". This value not begin with a '/' unless you intend to make the path absolute rather than relative to the current theme.- Overrides:
getDefaultTemplatein classSelect- Returns:
- The name of the template to be used as the default.
-
evaluateParams
public void evaluateParams()- Overrides:
evaluateParamsin classUIBean
-
getAllowMoveUp
-
setAllowMoveUp
-
getAllowMoveDown
-
setAllowMoveDown
-
getAllowSelectAll
-
setAllowSelectAll
-
getMoveUpLabel
-
setMoveUpLabel
-
getMoveDownLabel
-
setMoveDownLabel
-
getSelectAllLabel
-
setSelectAllLabel
-