Class CustomSelectionComponent
java.lang.Object
com.axemble.vdp.ui.framework.foundation.Component
com.axemble.vdp.ui.framework.foundation.Widget
com.axemble.vdp.ui.framework.widgets.components.sys.base.BaseComponent
com.axemble.vdp.ui.framework.widgets.components.sys.base.BaseInputComponent
com.axemble.vdp.ui.framework.widgets.components.sys.base.BaseFieldComponent
com.axemble.vdoc.sdk.document.fields.CustomSelectionComponent
- All Implemented Interfaces:
IFieldComponent
,IWidget
,IWritable
,com.axemble.vdp.form.classes.IBaseComponentSupport
,com.axemble.vdp.ui.core.document.fields.IFieldControl
,com.axemble.vdp.utils.parameters.ParamsHandler
,Serializable
public class CustomSelectionComponent
extends com.axemble.vdp.ui.framework.widgets.components.sys.base.BaseFieldComponent
Composant de paramétrage dynamique
Propose 5 types de champs (voir CustomSelectionComponent.FieldTypeKeys
), à définir dans l'attribut "options" (séparés par ";") :
- customOption : une valeur prédéfinie
- selector : un champ sélecteur
- field : un champ sélecteur de champ
- customValue : un champ texte
- cutomList : un champ liste déroulante
Utiliser addParameter(String key, Object value)
ou addParameter(String type, String key, Object value)
pour valoriser les attributs des différents champs.
Utiliser setList(Map list)
pour valoriser la liste des options de la combo box.
- Author:
- Vincent
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
Classe pour gérer les évènements de la combostatic interface
All available field keys customOption :CustomSelectionComponent.FieldTypeKeys.CUSTOM_OPTION_KEY
selector :CustomSelectionComponent.FieldTypeKeys.SELECTOR_KEY
field :CustomSelectionComponent.FieldTypeKeys.FIELD_KEY
customValue :CustomSelectionComponent.FieldTypeKeys.CUSTOM_VALUE_KEY
customList :CustomSelectionComponent.FieldTypeKeys.CUSTOM_LIST_KEY
-
Field Summary
Modifier and TypeFieldDescriptionprotected com.axemble.vdp.ui.framework.widgets.CtlComboBox
protected String
protected String
static final String
static final String
protected IFieldComponent
static final String
static final String
static final String
protected static final String
protected Object
Fields inherited from class com.axemble.vdp.ui.framework.widgets.components.sys.base.BaseFieldComponent
aggregate, hasService
Fields inherited from class com.axemble.vdp.ui.framework.widgets.components.sys.base.BaseInputComponent
accesskey, associatedLabel, condition, description, editable, errorInfo, formula, formulaCondition, includeErrorInfo, javascriptId, mandatory, modeFormula, property, propertytype, quickCreateLink, requiredFormula, rules, stringRecipient, tabindex, temporarypropertyname, throwDocumentChangedScript, throwEvents, throwEventsDefined, validationRules
Fields inherited from class com.axemble.vdp.ui.framework.widgets.components.sys.base.BaseComponent
additionalParameters, additionalParametersNodes, id, parameters
Fields inherited from class com.axemble.vdp.ui.framework.foundation.Widget
actionListeners, isHidden, param, parentBlock, sysname, userId
Fields inherited from class com.axemble.vdp.ui.framework.foundation.Component
changeListeners, LOGGER
Fields inherited from interface com.axemble.vdp.utils.parameters.ParamsHandler
ERROR_EXCEED_ELEM_SIZE, ERROR_EXCEED_TOTAL_SIZE, ERROR_NOT_COMPLETED, ERROR_READ_FAILED, EXCEED_ELEM_NUMBER, NO_ERROR
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a new listenervoid
addParameter
(String key, Object value) Valorise les paramètres des champsvoid
addParameter
(String type, String key, Object value) Valorise les paramètres des champsprotected Collection
<com.axemble.vdp.ui.framework.widgets.list.Option> createOptionList
(Map<Object, Object> list) protected String
protected Object
getKeyLabel
(String key) getSelectedOption
(Object value) Retourne l'option de la combo sélectionnée en fonction de la valeur du composantboolean
Returns true if the list has a change listener, false otherwise.void
Add error messageprotected void
boolean
boolean
isEmpty()
protected void
loadParameters
(Element element) com.axemble.vdp.ui.framework.components.listeners.ChangeListener
Removes anChangeListener
from the Widget.void
Removes all changeListeners from the Widget.render()
Render the widgetvoid
setDescription
(String description) void
setErrorInfo
(String errorMessage) protected void
setFieldComponentParameter
(String key, Object value, String selectedType) void
Valorise la liste des options de la liste déroulantevoid
Update widgetvoid
la valeur sauvegardé peut être : - custom => String - property => IProperty - selector => Objet du sélecteurMethods inherited from class com.axemble.vdp.ui.framework.widgets.components.sys.base.BaseFieldComponent
addCssDependency, addScriptDependency, getAbstractField, getField, getFieldChangeListener, getTemplateWriter, init, init, isHasService, setHasService, stateChanged
Methods inherited from class com.axemble.vdp.ui.framework.widgets.components.sys.base.BaseInputComponent
addRefreshButton, addValidationRule, afterInit, canThrowEventsInWebBrowser, clearValidationRules, findStringRecipient, focus, getAccesskey, getAssociatedLabel, getDocumentChangedScript, getErrorInfo, getFormula, getFormulaCondition, getHelpMessageIcon, getJavaScriptFocusScript, getModeFormula, getParentId, getProperty, getPropertyName, getPropertytype, getQuickCreateLink, getRefreshButton, getRequiredFormula, getTabindex, getTemporarypropertyname, getValidationRules, handleNoParams, handleParams, handleParams, hasValidationRules, init, initParameters, initParameters, isCondition, isDocumentChangedScript, isEditable, isFocus, isForceParentId, isIncludeErrorInfo, isMandatory, isThrowDocumentChangedScript, isThrowEvents, isThrowEventsDefined, registerWidget, renderErrorInfo, renderInfoMessage, renderQuickCreate, setAccesskey, setAssociatedLabel, setCondition, setEditable, setFormula, setFormulaCondition, setIncludeErrorInfo, setJavascriptId, setMandatory, setModeFormula, setProperty, setPropertytype, setQuickCreateContextParameter, setQuickCreateScreen, setRequiredFormula, setTabindex, setTemporarypropertyname, setThrowDocumentChangedScript, setThrowEvents, setThrowEventsDefined, setValidationRules, validate
Methods inherited from class com.axemble.vdp.ui.framework.widgets.components.sys.base.BaseComponent
getAdditionalParameters, getAdditionalParametersNodes, getAdditionalParametersNodesElement, getId, getParameter, getParameter, getParameterBoolean, getParameterBoolean, getParameterDate, getParameterDate, getParameterInt, getParameterInteger, getParameterList, getParameterLong, getParameterNumber, getParameters, getParameterString, getParameterString, hasParameter, removeParameter, setAdditionalParameters, setAdditionalParametersNodes, setId, setParameters
Methods inherited from class com.axemble.vdp.ui.framework.foundation.Widget
addActionListener, buildFireMessage, buildFireMessage, buildFireMessage, buildFireMessage, buildFireMessage, buildFireMessage, buildFireOnClickMessage, buildFireOnClickMessage, buildFormName, findFileRecipient, findXmlRecipient, fireActionEvent, getCtrlTemplate, getCtrlTemplateWriter, getParam, getParentBlock, getSysname, getUserDisplayName, getUserId, handleAction, hasActionListeners, isHidden, refresh, refreshWidgets, removeActionListener, removeActionListeners, renderMobile, setHidden, setParam, setParentBlock, setSysname, setUserId, write
Methods inherited from class com.axemble.vdp.ui.framework.foundation.Component
addChangeListener, createComponent, evaluateExpressions, fireChangeEvent, getDynamicDescription, getDynamicLabel, getLanguage, getNavigator, getRootNavigator, getStaticString, getStaticString, getStaticString, getStaticString, getStaticString, hasChangeListeners, removeChangeListener, removeChangeListeners
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.axemble.vdp.form.classes.IBaseComponentSupport
getLanguage, getStaticString, getStaticString, getStaticString, getStaticString, getStaticString, isHidden, setHidden
Methods inherited from interface com.axemble.vdoc.sdk.interfaces.ui.IFieldComponent
addValidationRule, clearValidationRules, getUserId, getValidationRules, hasValidationRules, isEditable, isHidden, isMandatory, setEditable, setHidden, setMandatory, setUserId, validate
Methods inherited from interface com.axemble.vdp.ui.core.document.fields.IFieldControl
addValidationRule, clearValidationRules, getUserId, getValidationRules, hasValidationRules, isEditable, isHidden, isMandatory, setEditable, setHidden, setMandatory, setUserId, validate
Methods inherited from interface com.axemble.vdoc.sdk.interfaces.ui.IWidget
afterInit, getParentBlock, getSysname, refresh, setParentBlock, setSysname
-
Field Details
-
SEPARATOR
- See Also:
-
customOptionLabel
-
customOptionValue
-
customListOptions
-
SELECTOR_SCREEN_DEFAULT_VALUE
- See Also:
-
SELECTOR_METHOD_DEFAULT_VALUE
- See Also:
-
SELECTOR_SELECTABLE_DEFAULT_VALUE
- See Also:
-
FIELD_SCREEN_DEFAULT_VALUE
- See Also:
-
FIELD_METHOD_DEFAULT_VALUE
- See Also:
-
knownKeys
-
comboBox
protected com.axemble.vdp.ui.framework.widgets.CtlComboBox comboBox -
fieldComponent
-
value
-
-
Constructor Details
-
CustomSelectionComponent
public CustomSelectionComponent()
-
-
Method Details
-
addFieldTypeChangeListener
Add a new listener- Parameters:
listener
-
-
removeFieldTypeChangeListener
public com.axemble.vdp.ui.framework.components.listeners.ChangeListener removeFieldTypeChangeListener(CustomSelectionComponent.FieldTypeChangeListener listener) Removes anChangeListener
from the Widget.- Parameters:
listener
- theChangeListener
to remove.
-
removeFieldTypeChangeListeners
public void removeFieldTypeChangeListeners()Removes all changeListeners from the Widget. -
hasFieldTypeChangeListeners
public boolean hasFieldTypeChangeListeners()Returns true if the list has a change listener, false otherwise.- Returns:
- true if the list has a change listener, false otherwise.
-
getKeyLabel
-
initAdditionalParameters
protected void initAdditionalParameters()- Specified by:
initAdditionalParameters
in classcom.axemble.vdp.ui.framework.widgets.components.sys.base.BaseInputComponent
-
getFieldValue
-
getFieldComponentClassName
-
loadParameters
-
updateControl
public void updateControl()Description copied from interface:IFieldComponent
Update widget -
updateValue
public void updateValue()la valeur sauvegardé peut être : - custom => String - property => IProperty - selector => Objet du sélecteur -
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in classcom.axemble.vdp.ui.framework.widgets.components.sys.base.BaseInputComponent
-
render
Description copied from interface:IWidget
Render the widget- Specified by:
render
in interfaceIWidget
- Specified by:
render
in classcom.axemble.vdp.ui.framework.foundation.Widget
- Returns:
- writableWidget
- Throws:
RenderException
-
setFieldComponentParameter
-
setErrorInfo
- Overrides:
setErrorInfo
in classcom.axemble.vdp.ui.framework.widgets.components.sys.base.BaseInputComponent
-
setDescription
- Overrides:
setDescription
in classcom.axemble.vdp.ui.framework.widgets.components.sys.base.BaseInputComponent
-
getDescription
- Overrides:
getDescription
in classcom.axemble.vdp.ui.framework.widgets.components.sys.base.BaseInputComponent
-
isDescription
public boolean isDescription()- Overrides:
isDescription
in classcom.axemble.vdp.ui.framework.widgets.components.sys.base.BaseInputComponent
-
getJavascriptId
- Overrides:
getJavascriptId
in classcom.axemble.vdp.ui.framework.widgets.components.sys.base.BaseInputComponent
-
getValidationObject
- Specified by:
getValidationObject
in classcom.axemble.vdp.ui.framework.widgets.components.sys.base.BaseInputComponent
-
inform
Description copied from interface:IFieldComponent
Add error message- Specified by:
inform
in interfacecom.axemble.vdp.form.classes.IBaseComponentSupport
- Specified by:
inform
in interfaceIFieldComponent
- Specified by:
inform
in interfacecom.axemble.vdp.ui.core.document.fields.IFieldControl
- Overrides:
inform
in classcom.axemble.vdp.ui.framework.widgets.components.sys.base.BaseInputComponent
- Parameters:
errorMessage
-
-
createOptionList
protected Collection<com.axemble.vdp.ui.framework.widgets.list.Option> createOptionList(Map<Object, Object> list) -
addParameter
Valorise les paramètres des champs- Overrides:
addParameter
in classcom.axemble.vdp.ui.framework.widgets.components.sys.base.BaseComponent
- Parameters:
key
- nom du paramètre du type TypedeChamp-NomParamètre (voirCustomSelectionComponent.FieldTypeKeys
)value
- valeur du paramètre- See Also:
-
addParameter
Valorise les paramètres des champs- Parameters:
type
- type du champ à valoriser (voirCustomSelectionComponent.FieldTypeKeys
)key
- nom du paramètrevalue
- valeur du paramètre- See Also:
-
getAvailableOptions
- Returns:
- la liste des champs définis.
-
getSelectedOption
Retourne l'option de la combo sélectionnée en fonction de la valeur du composant- Parameters:
value
-- Returns:
-
getSelectedOption
- Returns:
- l'option sélectionnée.
-
setList
Valorise la liste des options de la liste déroulante- Parameters:
list
-
-
getCustomOptionValue
-