|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.araneaframework.core.BaseComponent
org.araneaframework.core.BaseService
org.araneaframework.core.BaseWidget
org.araneaframework.core.BaseApplicationWidget
org.araneaframework.uilib.form.control.BaseControl
org.araneaframework.uilib.form.control.StringArrayRequestControl
org.araneaframework.uilib.form.control.MultiSelectControl
public class MultiSelectControl
This class represents a multiselect control (aka list).
| Nested Class Summary | |
|---|---|
class |
MultiSelectControl.ViewModel
Represents a multiselect control view model. |
| Nested classes/interfaces inherited from class org.araneaframework.uilib.form.control.BaseControl |
|---|
BaseControl.WidgetImpl |
| Nested classes/interfaces inherited from class org.araneaframework.core.BaseApplicationWidget |
|---|
BaseApplicationWidget.CompositeImpl, BaseApplicationWidget.ViewableImpl |
| Nested classes/interfaces inherited from class org.araneaframework.core.BaseService |
|---|
BaseService.ServiceImpl |
| Nested classes/interfaces inherited from class org.araneaframework.core.BaseComponent |
|---|
BaseComponent.ComponentImpl |
| Nested classes/interfaces inherited from interface org.araneaframework.Widget |
|---|
Widget.Interface |
| Nested classes/interfaces inherited from interface org.araneaframework.Viewable |
|---|
Viewable.Interface, Viewable.ViewableComponent, Viewable.ViewableService, Viewable.ViewableWidget |
| Nested classes/interfaces inherited from interface org.araneaframework.core.ApplicationWidget |
|---|
ApplicationWidget.WidgetViewModel |
| Nested classes/interfaces inherited from interface org.araneaframework.core.ApplicationService |
|---|
ApplicationService.ServiceViewModel |
| Nested classes/interfaces inherited from interface org.araneaframework.core.ApplicationComponent |
|---|
ApplicationComponent.ComponentViewModel |
| Nested classes/interfaces inherited from interface org.araneaframework.Composite |
|---|
Composite.CompositeComponent, Composite.CompositeService, Composite.CompositeWidget |
| Field Summary | |
|---|---|
protected List |
items
The DisplayItemUtil. |
| Fields inherited from class org.araneaframework.uilib.form.control.StringArrayRequestControl |
|---|
eventHelper |
| Fields inherited from class org.araneaframework.uilib.form.control.BaseControl |
|---|
innerData, isReadFromRequest, value |
| Fields inherited from class org.araneaframework.core.BaseService |
|---|
currentInputData, currentOutputData |
| Fields inherited from interface org.araneaframework.core.ApplicationWidget |
|---|
EVENT_HANDLER_ID_KEY, EVENT_PARAMETER_KEY, EVENT_PATH_KEY |
| Fields inherited from interface org.araneaframework.core.ApplicationService |
|---|
ACTION_HANDLER_ID_KEY, ACTION_PARAMETER_KEY, ACTION_PATH_KEY |
| Constructor Summary | |
|---|---|
MultiSelectControl()
|
|
| Method Summary | |
|---|---|
void |
addDisplayItems(Collection valueObjects,
String valueName,
String labelName)
Deprecated. use addFromBeanCollection(Collection, String, String) instead |
void |
addFromBeanCollection(Collection beanCollection,
String valueName,
String displayStringName)
Creates DisplayItems corresponding to beans in beanCollection and adds
these to this MultiSelectControl. |
void |
addFromBeanCollection(Collection beanCollection,
String valueName,
org.apache.commons.collections.Transformer displayTransformer)
Creates DisplayItems corresponding to beans in beanCollection and adds
these to this MultiSelectControl. |
void |
addFromBeanCollection(Collection beanCollection,
org.apache.commons.collections.Transformer valueTransformer,
String displayStringName)
Creates DisplayItems corresponding to beans in beanCollection and adds
these to this MultiSelectControl. |
void |
addFromBeanCollection(Collection beanCollection,
org.apache.commons.collections.Transformer valueTransformer,
org.apache.commons.collections.Transformer displayTransformer)
Creates DisplayItems corresponding to beans in beanCollection and adds
these to this MultiSelectControl. |
void |
addItem(DisplayItem item)
Adds a display-item to the element. |
void |
addItems(Collection items)
Adds a display-items to the element. |
void |
clearItems()
Clears the list of select-items. |
protected String[] |
convertToStringArray(Collection data)
Converts the given List<String> to a String[]. |
protected Object |
fromRequestParameters(String[] parameterValues)
Converts String[] to List<String>. |
List |
getDisplayItems()
Returns a List < that this DisplayItemContainer currently helds. |
String |
getRawValueType()
Returns "List<String>". |
int |
getValueIndex(String value)
Returns the index of the display item with the specified value. |
Object |
getViewModel()
Returns MultiSelectControl.ViewModel. |
protected String[] |
preprocessRequestParameters(String[] parameterValues)
Removes all empty strings from the String[] request parameters. |
void |
sort(Comparator comparator)
Provides a way to sort the items in this MultiSelectControl. |
protected String[] |
toResponseParameters(Object controlValue)
Converts List<String> to String[]. |
protected void |
validateNotNull()
Empty method for overriding. |
| Methods inherited from class org.araneaframework.uilib.form.control.StringArrayRequestControl |
|---|
addOnChangeEventListener, clearOnChangeEventListeners, convert, init, readFromRequest, setRawValue, validate |
| Methods inherited from class org.araneaframework.uilib.form.control.BaseControl |
|---|
_getWidget, action, addError, convertAndValidate, getFormElementCtx, getLabel, getRawValue, handleEvent, isDisabled, isMandatory, isRead, isValid, setFormElementCtx, update |
| Methods inherited from class org.araneaframework.core.BaseApplicationWidget |
|---|
_getComposite, _getViewable, addActionListener, addEventListener, addWidget, addWidget, clearActionListeners, clearEventlisteners, clearGlobalEventListener, disableWidget, enableWidget, event, getActionId, getChildEnvironment, getChildren, getChildWidgetEnvironment, getEnvironment, getEventId, getWidget, handleAction, handleUpdate, propagate, putViewData, putViewDataOnce, removeActionListener, removeEventListener, removeViewData, removeWidget, render, setGlobalEventListener |
| Methods inherited from class org.araneaframework.core.BaseWidget |
|---|
getInputData, getOutputData, handleWidgetException |
| Methods inherited from class org.araneaframework.core.BaseService |
|---|
_getService, handleServiceException |
| Methods inherited from class org.araneaframework.core.BaseComponent |
|---|
_addComponent, _addComponent, _checkCall, _disableComponent, _enableComponent, _endCall, _endWaitingCall, _getChildren, _getComponent, _getDisabledChildren, _propagate, _relocateComponent, _removeComponent, _setEnvironment, _setScope, _startCall, _startWaitingCall, _strictCheckCall, _strictStartCall, _waitNoCall, destroy, disable, enable, getScope, handleException, isAlive, isDead, isInitialized |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.araneaframework.Service |
|---|
_getService |
| Methods inherited from interface org.araneaframework.Component |
|---|
_getComponent, getEnvironment, getScope, isAlive |
| Methods inherited from interface org.araneaframework.Viewable |
|---|
_getViewable |
| Field Detail |
|---|
protected List items
DisplayItemUtil.
| Constructor Detail |
|---|
public MultiSelectControl()
| Method Detail |
|---|
public void addItem(DisplayItem item)
addItem in interface DisplayItemContaineritem - the item to be added.public void addItems(Collection items)
addItems in interface DisplayItemContaineritems - the items to be added.public void clearItems()
clearItems in interface DisplayItemContainerpublic List getDisplayItems()
DisplayItemContainerList <DisplayItem> that this DisplayItemContainer currently helds.
getDisplayItems in interface DisplayItemContainerpublic int getValueIndex(String value)
DisplayItemContainer
getValueIndex in interface DisplayItemContainervalue - display item value.
public void addDisplayItems(Collection valueObjects,
String valueName,
String labelName)
addFromBeanCollection(Collection, String, String) instead
valueObjects - Collection of Value Objects.valueName - the name of the Value Object field corresponding to the value of the select
item.labelName - the name of the Value Object field corresponding to the label of the select
item.
public void addFromBeanCollection(Collection beanCollection,
String valueName,
String displayStringName)
DisplayItems corresponding to beans in beanCollection and adds
these to this MultiSelectControl.
beanCollection - Collection of beansvalueName - name of bean field that determines DisplayItems valuedisplayStringName - name of bean field that determines DisplayItems displayString
public void addFromBeanCollection(Collection beanCollection,
String valueName,
org.apache.commons.collections.Transformer displayTransformer)
DisplayItems corresponding to beans in beanCollection and adds
these to this MultiSelectControl.
beanCollection - Collection of beansvalueName - name of bean field that determines DisplayItems valuedisplayTransformer - Transformer producing label (DisplayItems displayString) for a bean
public void addFromBeanCollection(Collection beanCollection,
org.apache.commons.collections.Transformer valueTransformer,
String displayStringName)
DisplayItems corresponding to beans in beanCollection and adds
these to this MultiSelectControl.
beanCollection - Collection of beansvalueTransformer - Transformer producing value (DisplayItem.getValue()) from a bean.displayStringName - name of bean field that determines DisplayItems displayString
public void addFromBeanCollection(Collection beanCollection,
org.apache.commons.collections.Transformer valueTransformer,
org.apache.commons.collections.Transformer displayTransformer)
DisplayItems corresponding to beans in beanCollection and adds
these to this MultiSelectControl.
beanCollection - Collection of beansvalueTransformer - Transformer producing value (DisplayItem.getValue()) from a bean.displayTransformer - Transformer producing label (displayString) from a beanpublic String getRawValueType()
getRawValueType in interface Controlpublic void sort(Comparator comparator)
MultiSelectControl.
The comparator parameter is used to compare
DisplayItems and, therefore, to set the order.
comparator - Any Comparator that is used to define order
of display items.public Object getViewModel()
MultiSelectControl.ViewModel.
getViewModel in class StringArrayRequestControlMultiSelectControl.ViewModel.protected String[] preprocessRequestParameters(String[] parameterValues)
String[] request parameters.
preprocessRequestParameters in class StringArrayRequestControlparameterValues - String[]- the values from request.
protected String[] convertToStringArray(Collection data)
List<String> to a String[].
data - List<String>.
String[].protected void validateNotNull()
StringArrayRequestControl
validateNotNull in class StringArrayRequestControlprotected Object fromRequestParameters(String[] parameterValues)
String[] to List<String>.
fromRequestParameters in class StringArrayRequestControlparameterValues - the request parameters.
protected String[] toResponseParameters(Object controlValue)
List<String> to String[].
toResponseParameters in class StringArrayRequestControlcontrolValue - the control value.
String[] representation of the control value.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||