@DesignerControl(defaultWidth=3)
@DocumentedComponent(category=INPUTS_AND_VALIDATION,
value="Enables users to quickly find and select from a pre-populated list of values as they type, leveraging searching and filtering.",
icon="fa fa-outdent")
@Control(parents={PanelGroup.class,Group.class,Column.class,Tab.class,Row.class,pl.fhframework.model.forms.Form.class,Repeater.class},
invalidParents=Table.class,
canBeDesigned=true)
public class Combo
extends BaseInputFieldWithKeySupport
| Modifier and Type | Class and Description |
|---|---|
protected static class |
Combo.ComboItemDTO |
| Modifier and Type | Field and Description |
|---|---|
protected static String |
ADDED_TAG |
protected boolean |
cleared |
protected static String |
CLEARED |
protected Integer |
cursor |
protected static String |
CURSOR |
protected pl.fhframework.binding.ModelBinding |
cursorBinding |
protected org.springframework.util.MultiValueMap<String,Object> |
filteredObjectValues |
protected org.springframework.util.MultiValueMap<String,Combo.ComboItemDTO> |
filteredValues |
protected java.util.function.BiPredicate<Object,String> |
filterFunction |
protected boolean |
filterInvoked |
protected String |
filterText |
protected boolean |
firstLoad |
protected boolean |
freeTyping |
protected Class<?> |
modelType |
protected boolean |
multiselect |
protected static String |
MULTISELECT_RAW_VALUE_ATTR |
protected String |
multiselectRawValue |
protected boolean |
preload |
protected String |
rawValue |
protected static String |
REMOVED_INDEX_ATTR |
protected static String |
SELECTED_INDEX_ATTR |
protected static String |
SELECTED_INDEX_GROUP_ATTR |
static String |
SELECTED_ITEM_ATTR
Old name of value property used by Combo
|
protected Object |
selectedItem |
protected int |
selectedItemIndex |
protected static String |
TEXT |
protected org.springframework.util.MultiValueMap<String,Object> |
values |
LABEL_ATTR, MESSAGE_FOR_FIELD_ATTR, ON_CHANGE_ATTR, PRESENTATION_STYLE_ATTR, RAW_VALUE_ATTR, REQUIRED_ATTR, VALIDATION_LABEL_ATTR, validationManager, validConversion, VALUE_ATTRCONFIRATION_MSG_ATTR| Constructor and Description |
|---|
Combo(pl.fhframework.model.forms.Form form) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
changeSelectedItemBinding() |
protected org.springframework.util.MultiValueMap<String,Combo.ComboItemDTO> |
collectValues(org.springframework.util.MultiValueMap<String,Object> valuesToConvert) |
protected String |
convertToRaw(pl.fhframework.BindingResult<?> bindingResult) |
Combo |
createNewSameComponent()
Create a new component of the same type.
|
void |
doCopy(Table table,
Map<String,String> iteratorReplacements,
BaseInputField baseClone)
Copies values of attributes with replaced iterators in bindings and actions to a new component of the same type.
|
List<pl.fhframework.binding.ModelBinding> |
getAllBingings() |
Optional<pl.fhframework.binding.ActionBinding> |
getEventHandler(pl.fhframework.model.dto.InMessageEventData eventData) |
Optional<String> |
getOptionalFormatter() |
protected String |
objectToString(Object s) |
void |
prepareComponentAfterValidation(pl.fhframework.model.dto.ElementChanges elementChanges) |
protected boolean |
processFilterBinding(pl.fhframework.model.dto.ElementChanges elementChanges,
boolean valuesChanged) |
protected void |
processFiltering(String text) |
protected pl.fhframework.validation.FormFieldHints |
processPresentationStyle(pl.fhframework.model.dto.ElementChanges elementChanges,
List<pl.fhframework.validation.FieldValidationResult> fieldValidationResults) |
protected boolean |
processValueBinding(pl.fhframework.model.dto.ElementChanges elementChanges) |
protected boolean |
processValuesBinding() |
protected void |
selectItemByFilterText() |
void |
setFormatter(String formatter) |
void |
setOnDblSpecialKey(pl.fhframework.binding.ActionBinding onDblSpecialKey) |
void |
setOnEmptyValue(pl.fhframework.binding.ActionBinding onEmptyValue) |
pl.fhframework.binding.IActionCallbackContext |
setOnEmptyValue(pl.fhframework.binding.IActionCallback onEmptyValue) |
void |
setOnInput(pl.fhframework.binding.ActionBinding onInput) |
pl.fhframework.binding.IActionCallbackContext |
setOnInput(pl.fhframework.binding.IActionCallback onInput) |
void |
setOnSpecialKey(pl.fhframework.binding.ActionBinding onSpecialKey) |
pl.fhframework.binding.IActionCallbackContext |
setOnSpecialKey(pl.fhframework.binding.IActionCallback onSpecialKey) |
protected String |
toRawValue(Object s) |
protected void |
updateFilterTextBinding() |
void |
updateModel(pl.fhframework.model.dto.ValueChange valueChange) |
pl.fhframework.model.dto.ElementChanges |
updateView() |
void |
validate() |
init, setOnKeyEvent, setOnKeyEventcalculateAvailability, calculatePresentationStyle, checkBinding, convertMainValueToString, createValidationManager, getTargetModelBinding, processCoversionException, processLabelBinding, processStylesAndHints, processValidationForThisComponent, setLabelModelBindingAdHoc, setModelBindingAdHoc, setOnChange, setOnChangegetConfirmationMsg, getConfirmationMsgBinding, getConfirmOnEvent, processConfirmationMsgBinding, setConfirmationMsg, setConfirmationMsgBinding, setConfirmOnEventgetHeight, getHint, getHintBinding, getHintPlacement, getHintTrigger, getHorizontalAlign, getInlineStyle, getMarginBottom, getMarginLeft, getMarginRight, getMarginTop, getPaddingBottom, getPaddingLeft, getPaddingRight, getPaddingTop, getStyleClasses, getVerticalAlign, getWidth, getWrapperStyle, isPush, refreshElementToForm, refreshView, refreshView, setHeight, setHintBinding, setHintPlacement, setHintTrigger, setHorizontalAlign, setInlineStyle, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddingTop, setPush, setStyleClasses, setVerticalAlign, setWidth, setWrapperStyle, tryParseAttributeInPixelOrPercentageUnit, tryParseAttributeInPixelUnit, tryParseAttributeInPixelUnitareModelValuesTheSame, areValuesTheSame, clone, convertBindingValueToString, convertBindingValueToString, convertValue, convertValueToString, convertValueToString, createAdHocModelBinding, equals, finalizeReading, generateId, getAccessibilityRules, getAvailability, getAvailabilityModelBinding, getAvailablityAffectingActions, getBindingContext, getEventProcessingForm, getForm, getGeneratedIdPrefix, getGroupingParentComponent, getId, getOnDesignerToolboxDrop, getRawId, getType, hashCode, isArtificial, isGeneratedId, isInitDone, isInvisible, isStopProcessingUpdateView, onProcessingFinish, onProcessingStart, postClone, preConfigureClear, prepareEventDataArgument, refreshAvailability, resetInitDone, setArtificial, setAvailability, setAvailabilityModelBinding, setBindingContext, setGroupingParentComponent, setId, setInvisible, setOnDesignerToolboxDrop, setOnDesignerToolboxDrop, setRawId, setStopProcessingUpdateView, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitgetKeyEvent, getKeyEventHandler, getKeyEventHandlers, getOnKeyEvent, initKeyHandlers, setKeyEvent, setKeyEventHandlersgetIcon, getIconAlignment, getIconBinding, resolveIconBindingupdateBinding, updateBinding, updateBindingForValue, updateBindingForValuegetId, getLabel, getModelBinding, getPresentationStyle, getValidationLabelModelBinding, skipSettingPresentationdoCopy, getCopy, getCopypublic static final String SELECTED_ITEM_ATTR
protected static final String MULTISELECT_RAW_VALUE_ATTR
protected static final String TEXT
protected static final String ADDED_TAG
protected static final String SELECTED_INDEX_ATTR
protected static final String REMOVED_INDEX_ATTR
protected static final String SELECTED_INDEX_GROUP_ATTR
protected static final String CLEARED
protected static final String CURSOR
protected Object selectedItem
protected int selectedItemIndex
protected String rawValue
protected String filterText
protected org.springframework.util.MultiValueMap<String,Object> filteredObjectValues
protected org.springframework.util.MultiValueMap<String,Combo.ComboItemDTO> filteredValues
protected boolean cleared
protected java.util.function.BiPredicate<Object,String> filterFunction
protected boolean filterInvoked
@XMLProperty
@DocumentedComponentAttribute(defaultValue="false",
value="Defines if combo values should be present even if no text is typed")
protected boolean preload
protected boolean firstLoad
protected boolean freeTyping
@XMLProperty
@DocumentedComponentAttribute(defaultValue="false",
value="Determines if multiselect is enabled in combo. If multiselect is set to true, value has to be set to Collection.")
@DesignerXMLProperty(functionalArea=SPECIFIC,
priority=10)
protected boolean multiselect
protected String multiselectRawValue
protected Class<?> modelType
@XMLProperty(value="cursor") @DesignerXMLProperty(allowedTypes=java.lang.Integer.class, functionalArea=CONTENT) @DocumentedComponentAttribute(boundable=true, value="Binding represents cursor from model of Form, used inside of \'{}\', like {model}.") protected pl.fhframework.binding.ModelBinding cursorBinding
protected Integer cursor
public Optional<pl.fhframework.binding.ActionBinding> getEventHandler(pl.fhframework.model.dto.InMessageEventData eventData)
getEventHandler in interface pl.fhframework.events.IEventSourcegetEventHandler in class BaseInputFieldWithKeySupportpublic void updateModel(pl.fhframework.model.dto.ValueChange valueChange)
updateModel in interface pl.fhframework.model.forms.IChangeableByClientupdateModel in class BaseInputFieldprotected void updateFilterTextBinding()
protected void selectItemByFilterText()
public void validate()
validate in interface pl.fhframework.core.forms.IValidatedComponentvalidate in class BaseInputFieldpublic void prepareComponentAfterValidation(pl.fhframework.model.dto.ElementChanges elementChanges)
prepareComponentAfterValidation in interface pl.fhframework.core.forms.IValidatedComponentprepareComponentAfterValidation in class BaseInputFieldprotected pl.fhframework.validation.FormFieldHints processPresentationStyle(pl.fhframework.model.dto.ElementChanges elementChanges,
List<pl.fhframework.validation.FieldValidationResult> fieldValidationResults)
processPresentationStyle in class BaseInputFieldpublic List<pl.fhframework.binding.ModelBinding> getAllBingings()
getAllBingings in interface pl.fhframework.core.forms.IValidatedComponentgetAllBingings in class BaseInputFieldprotected void changeSelectedItemBinding()
protected void processFiltering(String text)
public pl.fhframework.model.dto.ElementChanges updateView()
updateView in class BaseInputFieldprotected boolean processValuesBinding()
protected boolean processFilterBinding(pl.fhframework.model.dto.ElementChanges elementChanges,
boolean valuesChanged)
protected boolean processValueBinding(pl.fhframework.model.dto.ElementChanges elementChanges)
processValueBinding in class BaseInputFieldprotected org.springframework.util.MultiValueMap<String,Combo.ComboItemDTO> collectValues(org.springframework.util.MultiValueMap<String,Object> valuesToConvert)
protected String convertToRaw(pl.fhframework.BindingResult<?> bindingResult)
convertToRaw in class BaseInputFieldpublic void setFormatter(String formatter)
public Combo createNewSameComponent()
TableComponentpublic void doCopy(Table table, Map<String,String> iteratorReplacements, BaseInputField baseClone)
TableComponentdoCopy in interface TableComponent<BaseInputField>doCopy in class BaseInputFieldtable - tableiteratorReplacements - iterator replacementsbaseClone - a new component of the same typepublic void setOnInput(pl.fhframework.binding.ActionBinding onInput)
public pl.fhframework.binding.IActionCallbackContext setOnInput(pl.fhframework.binding.IActionCallback onInput)
public void setOnEmptyValue(pl.fhframework.binding.ActionBinding onEmptyValue)
public pl.fhframework.binding.IActionCallbackContext setOnEmptyValue(pl.fhframework.binding.IActionCallback onEmptyValue)
public void setOnSpecialKey(pl.fhframework.binding.ActionBinding onSpecialKey)
public void setOnDblSpecialKey(pl.fhframework.binding.ActionBinding onDblSpecialKey)
public pl.fhframework.binding.IActionCallbackContext setOnSpecialKey(pl.fhframework.binding.IActionCallback onSpecialKey)
Copyright © 2019. All rights reserved.