Class UpDownSelect


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"
  • Field Details

    • TEMPLATE

      public static final String TEMPLATE
      See Also:
    • allowMoveUp

      protected String allowMoveUp
    • allowMoveDown

      protected String allowMoveDown
    • allowSelectAll

      protected String allowSelectAll
    • moveUpLabel

      protected String moveUpLabel
    • moveDownLabel

      protected String moveDownLabel
    • selectAllLabel

      protected String selectAllLabel
  • Constructor Details

    • UpDownSelect

      public UpDownSelect(ValueStack stack, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
  • Method Details

    • getDefaultTemplate

      public String getDefaultTemplate()
      Description copied from class: UIBean
      A 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:
      getDefaultTemplate in class Select
      Returns:
      The name of the template to be used as the default.
    • evaluateParams

      public void evaluateParams()
      Overrides:
      evaluateParams in class UIBean
    • getAllowMoveUp

      public String getAllowMoveUp()
    • setAllowMoveUp

      public void setAllowMoveUp(String allowMoveUp)
    • getAllowMoveDown

      public String getAllowMoveDown()
    • setAllowMoveDown

      public void setAllowMoveDown(String allowMoveDown)
    • getAllowSelectAll

      public String getAllowSelectAll()
    • setAllowSelectAll

      public void setAllowSelectAll(String allowSelectAll)
    • getMoveUpLabel

      public String getMoveUpLabel()
    • setMoveUpLabel

      public void setMoveUpLabel(String moveUpLabel)
    • getMoveDownLabel

      public String getMoveDownLabel()
    • setMoveDownLabel

      public void setMoveDownLabel(String moveDownLabel)
    • getSelectAllLabel

      public String getSelectAllLabel()
    • setSelectAllLabel

      public void setSelectAllLabel(String selectAllLabel)