org.apache.struts2.components
Class OptionTransferSelect

java.lang.Object
  extended by org.apache.struts2.components.Component
      extended by org.apache.struts2.components.UIBean
          extended by org.apache.struts2.components.ListUIBean
              extended by org.apache.struts2.components.DoubleListUIBean
                  extended by org.apache.struts2.components.OptionTransferSelect

public class OptionTransferSelect
extends DoubleListUIBean

Create a option transfer select component which is basically two <select ...> tag with buttons in the middle of them allowing options in each of the <select ...> to be moved between themselves. Will auto-select all its elements upon its containing form submision.

NOTE: The id and doubleId need not be supplied as they will generated provided that the optiontransferselect tag is being used in a form tag. The generated id and doubleId will be <form_id>_<optiontransferselect_doubleName> and <form_id>_<optiontransferselect_doubleName> respectively.

 
 
 <-- minimum configuration -->
 <s:optiontransferselect
        label="Favourite Cartoons Characters"
                name="leftSideCartoonCharacters" 
                list="{'Popeye', 'He-Man', 'Spiderman'}" 
                doubleName="rightSideCartoonCharacters"
                doubleList="{'Superman', 'Mickey Mouse', 'Donald Duck'}" 
        />

  <-- possible configuration -->
  <s:optiontransferselect
        label="Favourite Cartoons Characters"
                name="leftSideCartoonCharacters" 
                leftTitle="Left Title"
                rightTitle="Right Title"
                list="{'Popeye', 'He-Man', 'Spiderman'}" 
                multiple="true"
                headerKey="headerKey"
                headerValue="--- Please Select ---"
                emptyOption="true"
                doubleList="{'Superman', 'Mickey Mouse', 'Donald Duck'}" 
                doubleName="rightSideCartoonCharacters"
                doubleHeaderKey="doubleHeaderKey"
                doubleHeaderValue="--- Please Select ---" 
                doubleEmptyOption="true"
                doubleMultiple="true"
        />
 
 
 


Field Summary
protected  java.lang.String addAllToLeftLabel
           
protected  java.lang.String addAllToRightLabel
           
protected  java.lang.String addToLeftLabel
           
protected  java.lang.String addToRightLabel
           
protected  java.lang.String allowAddAllToLeft
           
protected  java.lang.String allowAddAllToRight
           
protected  java.lang.String allowAddToLeft
           
protected  java.lang.String allowAddToRight
           
protected  java.lang.String allowSelectAll
           
protected  java.lang.String allowUpDownOnLeft
           
protected  java.lang.String allowUpDownOnRight
           
protected  java.lang.String buttonCssClass
           
protected  java.lang.String buttonCssStyle
           
protected  java.lang.String leftDownlabel
           
protected  java.lang.String leftTitle
           
protected  java.lang.String leftUpLabel
           
protected  java.lang.String rightDownLabel
           
protected  java.lang.String rightTitle
           
protected  java.lang.String rightUpLabel
           
protected  java.lang.String selectAllLabel
           
 
Fields inherited from class org.apache.struts2.components.DoubleListUIBean
doubleAccesskey, doubleCssClass, doubleCssStyle, doubleDisabled, doubleEmptyOption, doubleHeaderKey, doubleHeaderValue, doubleId, doubleList, doubleListKey, doubleListValue, doubleMultiple, doubleName, doubleOnblur, doubleOnchange, doubleOnclick, doubleOndblclick, doubleOnfocus, doubleOnkeydown, doubleOnkeypress, doubleOnkeyup, doubleOnmousedown, doubleOnmousemove, doubleOnmouseout, doubleOnmouseover, doubleOnmouseup, doubleOnselect, doubleSize, doubleValue, emptyOption, formName, headerKey, headerValue, multiple, size
 
Fields inherited from class org.apache.struts2.components.ListUIBean
list, listKey, listValue, throwExceptionOnNullValueAttribute
 
Fields inherited from class org.apache.struts2.components.UIBean
accesskey, cssClass, cssStyle, disabled, label, labelPosition, name, onblur, onchange, onclick, ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onselect, request, required, requiredposition, response, tabindex, template, templateDir, templateSuffix, theme, title, tooltip, tooltipConfig, value
 
Fields inherited from class org.apache.struts2.components.Component
COMPONENT_STACK, id, parameters, stack
 
Constructor Summary
OptionTransferSelect(com.opensymphony.xwork2.util.OgnlValueStack stack, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 
Method Summary
 void evaluateExtraParams()
           
 java.lang.String getAddAllToLeftLabel()
           
 java.lang.String getAddAllToRightLabel()
           
 java.lang.String getAddToLeftLabel()
           
 java.lang.String getAddToRightLabel()
           
 java.lang.String getAllowAddAllToLeft()
           
 java.lang.String getAllowAddAllToRight()
           
 java.lang.String getAllowAddToLeft()
           
 java.lang.String getAllowAddToRight()
           
 java.lang.String getAllowSelectAll()
           
 java.lang.String getAllowUpDownOnLeft()
           
 java.lang.String getAllowUpDownOnRight()
           
 java.lang.String getButtonCssClass()
           
 java.lang.String getButtonCssStyle()
           
protected  java.lang.String getDefaultTemplate()
          A contract that requires each concrete UI Tag to specify which template should be used as a default.
 java.lang.String getLeftDownLabel()
           
 java.lang.String getLeftTitle()
           
 java.lang.String getLeftUpLabel()
           
 java.lang.String getRightDownLabel()
           
 java.lang.String getRightTitle()
           
 java.lang.String getRightUpLabel()
           
 java.lang.String getSelectAllLabel()
           
 void setAddAllToLeftLabel(java.lang.String addAllToLeftLabel)
          set Add To Left button label
 void setAddAllToRightLabel(java.lang.String addAllToRightLabel)
          set Add All To Right button label
 void setAddToLeftLabel(java.lang.String addToLeftLabel)
          set Add To Left button label
 void setAddToRightLabel(java.lang.String addToRightLabel)
          set Add To Right button label
 void setAllowAddAllToLeft(java.lang.String allowAddAllToLeft)
          enable Add All To Left button
 void setAllowAddAllToRight(java.lang.String allowAddAllToRight)
          enable Add All To Right button
 void setAllowAddToLeft(java.lang.String allowAddToLeft)
          enable Add To Left button
 void setAllowAddToRight(java.lang.String allowAddToRight)
          enable Add To Right button
 void setAllowSelectAll(java.lang.String allowSelectAll)
          enable Select All button
 void setAllowUpDownOnLeft(java.lang.String allowUpDownOnLeft)
          enable up / down on the left side
 void setAllowUpDownOnRight(java.lang.String allowUpDownOnRight)
          enable up / down on the right side
 void setButtonCssClass(java.lang.String buttonCssClass)
          set buttons css class
 void setButtonCssStyle(java.lang.String buttonCssStyle)
          set button css style
 void setLeftDownLabel(java.lang.String leftDownLabel)
          Down label for the left side.
 void setLeftTitle(java.lang.String leftTitle)
          set Left title
 void setLeftUpLabel(java.lang.String leftUpLabel)
          Up label for the left side
 void setRightDownLabel(java.lang.String rightDownlabel)
          Down label for the left side.
 void setRightTitle(java.lang.String rightTitle)
          set Right title
 void setRightUpLabel(java.lang.String rightUpLabel)
          Up label for the right side.
 void setSelectAllLabel(java.lang.String selectAllLabel)
          set Select All button label
 
Methods inherited from class org.apache.struts2.components.DoubleListUIBean
getDoubleCssClass, getDoubleCssStyle, getDoubleDisabled, getDoubleEmptyOption, getDoubleHeaderKey, getDoubleHeaderValue, getDoubleId, getDoubleList, getDoubleListKey, getDoubleListValue, getDoubleMultiple, getDoubleName, getDoubleOnblur, getDoubleOnchange, getDoubleOnclick, getDoubleOndblclick, getDoubleOnfocus, getDoubleOnkeydown, getDoubleOnkeypress, getDoubleOnkeyup, getDoubleOnmousedown, getDoubleOnmousemove, getDoubleOnmouseout, getDoubleOnmouseover, getDoubleOnmouseup, getDoubleOnselect, getDoubleSize, getDoubleValue, getFormName, setDoubleAccesskey, setDoubleCssClass, setDoubleCssStyle, setDoubleDisabled, setDoubleEmptyOption, setDoubleHeaderKey, setDoubleHeaderValue, setDoubleId, setDoubleList, setDoubleListKey, setDoubleListValue, setDoubleMultiple, setDoubleName, setDoubleOnblur, setDoubleOnchange, setDoubleOnclick, setDoubleOndblclick, setDoubleOnfocus, setDoubleOnkeydown, setDoubleOnkeypress, setDoubleOnkeyup, setDoubleOnmousedown, setDoubleOnmousemove, setDoubleOnmouseout, setDoubleOnmouseover, setDoubleOnmouseup, setDoubleOnselect, setDoubleSize, setDoubleValue, setEmptyOption, setFormName, setHeaderKey, setHeaderValue, setMultiple, setSize
 
Methods inherited from class org.apache.struts2.components.ListUIBean
contains, getValueClassType, setList, setListKey, setListValue, setThrowExceptionOnNullValueAttribute
 
Methods inherited from class org.apache.struts2.components.UIBean
addFormParameter, buildTemplateName, enableAncestorFormCustomOnsubmit, end, escape, evaluateNameValue, evaluateParams, getTemplate, getTemplateDir, getTheme, getTooltipConfig, mergeTemplate, populateComponentHtmlId, setAccesskey, setCssClass, setCssStyle, setDisabled, setLabel, setLabelposition, setName, setOnblur, setOnchange, setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnselect, setRequired, setRequiredposition, setTabindex, setTemplate, setTemplateDir, setTheme, setTitle, setTooltip, setTooltipConfig, setValue
 
Methods inherited from class org.apache.struts2.components.Component
addAllParameters, addParameter, altSyntax, copyParams, determineActionURL, determineNamespace, end, fieldError, findAncestor, findString, findString, findValue, findValue, findValue, getComponentStack, getId, getParameters, getStack, popComponentStack, setId, start, toString, usesBody
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

allowAddToLeft

protected java.lang.String allowAddToLeft

allowAddToRight

protected java.lang.String allowAddToRight

allowAddAllToLeft

protected java.lang.String allowAddAllToLeft

allowAddAllToRight

protected java.lang.String allowAddAllToRight

allowSelectAll

protected java.lang.String allowSelectAll

allowUpDownOnLeft

protected java.lang.String allowUpDownOnLeft

allowUpDownOnRight

protected java.lang.String allowUpDownOnRight

leftTitle

protected java.lang.String leftTitle

rightTitle

protected java.lang.String rightTitle

buttonCssClass

protected java.lang.String buttonCssClass

buttonCssStyle

protected java.lang.String buttonCssStyle

addToLeftLabel

protected java.lang.String addToLeftLabel

addToRightLabel

protected java.lang.String addToRightLabel

addAllToLeftLabel

protected java.lang.String addAllToLeftLabel

addAllToRightLabel

protected java.lang.String addAllToRightLabel

selectAllLabel

protected java.lang.String selectAllLabel

leftUpLabel

protected java.lang.String leftUpLabel

leftDownlabel

protected java.lang.String leftDownlabel

rightUpLabel

protected java.lang.String rightUpLabel

rightDownLabel

protected java.lang.String rightDownLabel
Constructor Detail

OptionTransferSelect

public OptionTransferSelect(com.opensymphony.xwork2.util.OgnlValueStack stack,
                            javax.servlet.http.HttpServletRequest request,
                            javax.servlet.http.HttpServletResponse response)
Method Detail

getDefaultTemplate

protected java.lang.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.

Specified by:
getDefaultTemplate in class UIBean
Returns:
The name of the template to be used as the default.

evaluateExtraParams

public void evaluateExtraParams()
Overrides:
evaluateExtraParams in class DoubleListUIBean

getAddAllToLeftLabel

public java.lang.String getAddAllToLeftLabel()

setAddAllToLeftLabel

public void setAddAllToLeftLabel(java.lang.String addAllToLeftLabel)
set Add To Left button label


getAddAllToRightLabel

public java.lang.String getAddAllToRightLabel()

setAddAllToRightLabel

public void setAddAllToRightLabel(java.lang.String addAllToRightLabel)
set Add All To Right button label


getAddToLeftLabel

public java.lang.String getAddToLeftLabel()

setAddToLeftLabel

public void setAddToLeftLabel(java.lang.String addToLeftLabel)
set Add To Left button label


getAddToRightLabel

public java.lang.String getAddToRightLabel()

setAddToRightLabel

public void setAddToRightLabel(java.lang.String addToRightLabel)
set Add To Right button label


getAllowAddAllToLeft

public java.lang.String getAllowAddAllToLeft()

setAllowAddAllToLeft

public void setAllowAddAllToLeft(java.lang.String allowAddAllToLeft)
enable Add All To Left button


getAllowAddAllToRight

public java.lang.String getAllowAddAllToRight()

setAllowAddAllToRight

public void setAllowAddAllToRight(java.lang.String allowAddAllToRight)
enable Add All To Right button


getAllowAddToLeft

public java.lang.String getAllowAddToLeft()

setAllowAddToLeft

public void setAllowAddToLeft(java.lang.String allowAddToLeft)
enable Add To Left button


getAllowAddToRight

public java.lang.String getAllowAddToRight()

setAllowAddToRight

public void setAllowAddToRight(java.lang.String allowAddToRight)
enable Add To Right button


getLeftTitle

public java.lang.String getLeftTitle()

setAllowUpDownOnLeft

public void setAllowUpDownOnLeft(java.lang.String allowUpDownOnLeft)
enable up / down on the left side


getAllowUpDownOnLeft

public java.lang.String getAllowUpDownOnLeft()

setAllowUpDownOnRight

public void setAllowUpDownOnRight(java.lang.String allowUpDownOnRight)
enable up / down on the right side


getAllowUpDownOnRight

public java.lang.String getAllowUpDownOnRight()

setLeftTitle

public void setLeftTitle(java.lang.String leftTitle)
set Left title


getRightTitle

public java.lang.String getRightTitle()

setRightTitle

public void setRightTitle(java.lang.String rightTitle)
set Right title


setAllowSelectAll

public void setAllowSelectAll(java.lang.String allowSelectAll)
enable Select All button


getAllowSelectAll

public java.lang.String getAllowSelectAll()

setSelectAllLabel

public void setSelectAllLabel(java.lang.String selectAllLabel)
set Select All button label


getSelectAllLabel

public java.lang.String getSelectAllLabel()

setButtonCssClass

public void setButtonCssClass(java.lang.String buttonCssClass)
set buttons css class


getButtonCssClass

public java.lang.String getButtonCssClass()

setButtonCssStyle

public void setButtonCssStyle(java.lang.String buttonCssStyle)
set button css style


getButtonCssStyle

public java.lang.String getButtonCssStyle()

setLeftUpLabel

public void setLeftUpLabel(java.lang.String leftUpLabel)
Up label for the left side


getLeftUpLabel

public java.lang.String getLeftUpLabel()

setLeftDownLabel

public void setLeftDownLabel(java.lang.String leftDownLabel)
Down label for the left side.


getLeftDownLabel

public java.lang.String getLeftDownLabel()

setRightUpLabel

public void setRightUpLabel(java.lang.String rightUpLabel)
Up label for the right side.


getRightUpLabel

public java.lang.String getRightUpLabel()

setRightDownLabel

public void setRightDownLabel(java.lang.String rightDownlabel)
Down label for the left side.


getRightDownLabel

public java.lang.String getRightDownLabel()


Copyright © 2000-2006 Apache Software Foundation. All Rights Reserved.