public class SelectValues<T extends java.lang.Comparable<T>> extends InteractionFragment
Modifier and Type | Class and Description |
---|---|
static interface |
SelectValues.SelectValueListener
An event listener interface that can receive notifications on selection
changes in an instance of
SelectValues . |
MESSAGE_BOX_ERROR_ICON, MESSAGE_BOX_INFO_ICON, MESSAGE_BOX_QUESTION_ICON, MESSAGE_BOX_WARNING_ICON
MSG_PARAM_NOT_SET
Constructor and Description |
---|
SelectValues(java.lang.String sIdentifier,
java.lang.Class<T> rValueDatatype,
java.util.Collection<T> rAvailableValues,
boolean bSortValues)
Creates a new instance.
|
SelectValues(java.lang.String sIdentifier,
java.lang.Class<T> rValueDatatype,
java.util.Collection<T> rAvailableValues,
java.util.Collection<T> rPreferredValues)
Creates a new instance that sorts the list values and inserts a list of
preferred values at the beginning of each list.The values will be sorted
according to their natural order (i.e. their
Comparable
implementation). |
Modifier and Type | Method and Description |
---|---|
void |
enableEdit(boolean bEnable)
Overridden to show only the selected values if editing is disabled.
|
java.util.List<org.obrel.core.RelationType<?>> |
getInputParameters()
Returns the collection of input parameters of this fragment.
|
java.util.List<org.obrel.core.RelationType<?>> |
getInteractionParameters()
Returns the list of interaction parameters for this fragment.
|
java.util.Collection<T> |
getSelectedValues()
Returns the values that have been selected in this fragment.
|
void |
handleInteraction(org.obrel.core.RelationType<?> rInteractionParam)
Must be implemented by subclasses to handle interactions for this
fragment.
|
void |
init()
Must be implemented to initialize the interaction parameters of this
fragment.
|
void |
initFragmentParameter(org.obrel.core.RelationType<java.util.List<org.obrel.core.RelationType<?>>> rParam)
Initializes a parameter for this fragment.
|
protected void |
initProcessStep(Interaction rProcessStep)
Will be invoked after the process step of this fragment has been set.
|
void |
setAvailableValues(java.util.Collection<T> rValues)
Sets the values that are available for selection.
|
void |
setSelectedValues(java.util.Collection<T> rValues)
Sets the currently selected values.
|
void |
setSelectionListener(SelectValues.SelectValueListener rListener)
Sets a listener that will be notified if the selection in this instance
changes.
|
void |
setVisibleRows(int nRows)
Sets the number of rows that are visible in the value lists.
|
abort, abortFragment, addDisplayParameters, addInputParameters, addInputParameters, addPanelParameters, addParameterUpdateListener, addSubFragment, addSubFragment, addSubFragment, addSubFragment, addViewFragment, afterInteraction, applyAllCoupledParameters, attach, button, buttons, buttons, canRollback, chart, checkBox, checkBox, checkBoxes, cleanup, clearInteractionParameters, clearSelection, comboBox, dateParam, deleteRelation, display, dropDown, dropDown, entityParam, entityParam, enumParam, executeCleanupActions, finish, finishFragment, flagParam, fragmentParam, get, getFragmentParameter, getParameterInteractionHandler, getParameterValidations, getParent, getProcess, getProcessStep, getRelation, getRelations, getRoot, getTemporaryParameterId, getValueDatatype, hasInteraction, icon, iconButtons, iconButtons, image, imageButtons, initComplete, initQueryParameter, input, input, input, inputAttr, inputAttr, inputDate, inputTags, inputText, inputTextLines, insertInputParameters, insertInputParameters, intParam, isAttached, isInitialized, label, label, layout, listParam, lockEntityForProcess, lockEntityForStep, markFragmentInputParams, markInputParams, markParameterHierarchyAsModified, notifyParameterUpdateListeners, panel, panel, panel, panel, panel, panel, param, param, param, paramLike, prepareInteraction, prepareUpload, prepareUpload, radioButtons, reloadEntity, removeInteractionParameters, removeSubFragment, removeViewFragment, rollback, set, setContinueOnInteraction, setParam, setParameterInteractionHandler, setParameterValuesFromEntity, setParameterValuesFromEntity, setParent, setup, showConfirmationMessage, showDialog, showDialog, showDialog, showErrorMessage, showInfoMessage, showMessageBox, showMessageBox, showModalDialog, showView, showWarningMessage, structureModified, textParam, title, updateAllCoupledParameters, updateEntityFromParameterValues, updateUserInterface, validateFragmentParameters, validateParameters, validationError
addCleanupAction, addLayoutFiller, addPanel, addPanel, addProcessStepMessage, addSelectionDependency, addSelectionDependency, addStackPanel, addTabPanel, annotateForEntityQuery, annotateForEntityQuery, annotateParameter, applyDerivedParameter, applyDerivedParameters, applyExtraAttribute, changeDate, checkParameter, clearUIFlag, clearUIFlag, collectDerivedParameter, collectDerivedParameters, deleteParameters, disableElements, disableElements, disableElements, disableMultiSelectionElements, displayHistoryValue, enableAllElements, getAbsoluteFilePath, getAllowedElements, getAllowedValues, getCurrentQuery, getDerivedParameterValue, getFragmentId, getInputMode, getInteractiveInputParameter, getNamedTmpListType, getNamedTmpParameterType, getParameter, getParameterAnnotation, getParameterRelation, getProcessUser, getSelectionIndex, getSubFragment, getSubFragments, getTemporaryListType, getTemporaryListType, getTemporaryParameterName, getTemporaryParameterPackage, getTemporaryParameterType, getTemporaryParameterType, getTemporaryParameterType, getTemporarySetType, getUIProperties, getUIProperties, getUIProperty, getUserSetting, getUserSettings, hasFlagParameter, hasParameter, hasUIFlag, hasUserSetting, initChartParameter, initCountChartParameter, initProgressParameter, isInteractiveInput, isPanelParameter, lockEntity, markParameterAsModified, performParameterValidations, prepareDateInput, prepareDownload, prepareDownload, removeAllSubFragments, removeAllUIProperties, removeAllUIProperties, removeCleanupAction, removePanel, removeParameterAnnotation, removeSubFragment, removeTemporaryParameterType, removeUIProperties, setAllowedElements, setAllowedValues, setAllowedValues, setDatePeriod, setEnabled, setEnabled, setHtmlSize, setImmediateAction, setImmediateAction, setImmediateAction, setInteractive, setInteractive, setInteractive, setInteractive, setInteractive, setLayout, setParameter, setParameter, setParameterBounds, setProcessStepInfo, setProcessStepMessage, setProgressIndicator, setSelectionDependency, setSelectionDependency, setUIFlag, setUIFlag, setUIProperty, setUIProperty, setUIProperty, setUIProperty, setVisible, setVisible, spawnProcess, storeEntity, throwMissingParameterException, unlockEntity
addDisplayParameters, continueOnInteraction, hasInteractionParameter, markInputParams, params, removeAllParameterValidations, removeInteractionParameters, removeParameterValidations, removeParameterValidations, setMandatory, setParameterNotEmptyValidations, setParameterNotEmptyValidations, setParameterNotNullValidations, setParameterNotNullValidations, setParameterValidation, setParameterValidation, staticParams
notifyRelationListeners, readRelations, relationsEqual, relationsHashCode, relationsString, set, toString, transform, writeRelations
public SelectValues(java.lang.String sIdentifier, java.lang.Class<T> rValueDatatype, java.util.Collection<T> rAvailableValues, boolean bSortValues)
Comparable
interface.sIdentifier
- A process step-unique identifier of this instancerValueDatatype
- The datatype of the valuesrAvailableValues
- The available values to select frombSortValues
- TRUE to sort the list valuespublic SelectValues(java.lang.String sIdentifier, java.lang.Class<T> rValueDatatype, java.util.Collection<T> rAvailableValues, java.util.Collection<T> rPreferredValues)
Comparable
implementation). They will also be sorted on the server side before
resource expansion, therefore using this variant only makes sense with
values that are not resources.sIdentifier
- A process step-unique identifier of this instancerValueDatatype
- The datatype of the valuesrAvailableValues
- The available values to select fromrPreferredValues
- An optional list of preferred values that should
be listed first (empty for none)public void enableEdit(boolean bEnable)
enableEdit
in class InteractionFragment
bEnable
- TRUE to enable editing, FALSE to disableInteractionFragment.enableEdit(boolean)
public java.util.List<org.obrel.core.RelationType<?>> getInputParameters()
InteractionFragment.getInteractionParameters()
. The default
implementation returns a mutable collection that can been modified
directly by a subclass. Or it can be overridden by subclasses to return
their own input parameter collection.getInputParameters
in class InteractionFragment
public java.util.List<org.obrel.core.RelationType<?>> getInteractionParameters()
getInteractionParameters
in class InteractionFragment
public java.util.Collection<T> getSelectedValues()
public void handleInteraction(org.obrel.core.RelationType<?> rInteractionParam) throws java.lang.Exception
handleInteraction
in class InteractionFragment
rInteractionParam
- The interaction parameterjava.lang.Exception
- Any kind of exception may be thrown in case of errorspublic void init() throws java.lang.Exception
init
in interface de.esoco.lib.manage.Initializable
init
in class InteractionFragment
java.lang.Exception
- Any kind of exception may be thrown in case of errorspublic void initFragmentParameter(org.obrel.core.RelationType<java.util.List<org.obrel.core.RelationType<?>>> rParam)
init()
method of the parent fragment.rParam
- The parameter that will hold this fragmentpublic void setAvailableValues(java.util.Collection<T> rValues)
rValues
- The selectable values (can be NULL for none)public void setSelectedValues(java.util.Collection<T> rValues)
rValues
- The selected values (may be NULL for none)public void setSelectionListener(SelectValues.SelectValueListener rListener)
rListener
- The listenerpublic void setVisibleRows(int nRows)
nRows
- The number of visible rowsprotected void initProcessStep(Interaction rProcessStep)
InteractionFragment
initProcessStep
in class InteractionFragment
rProcessStep
- The process step of this fragmentProcessFragment.initProgressParameter()