Class AbstractControlComponent<M extends IModel,P extends IParameterization,V extends ControlViewModel>
java.lang.Object
com._1c.g5.aef2.components.Component<M,P>
com._1c.g5.aef2.standard.components.StandardComponent<M,P>
com._1c.g5.aef2.standard.components.AbstractControlComponent<M,P,V>
- Type Parameters:
M
- the model type.P
- the parameterization type.V
- the view model type.
- All Implemented Interfaces:
IComponent<M>
,IEventChannel
- Direct Known Subclasses:
AbstractDtSelectComponent
,AbstractGridComponent
,AggregatesTableComponent
,BigDecimalSpinnerComponent
,ButtonComponent
,CheckableLabelComponent
,CheckBoxComponent
,ComboComponent
,ComboLabelComponent
,CommonPictureHeavyComponent
,CommonPicturePreviewImageComponent
,CommonPicturePreviewImageSizeComponent
,ConditionalAppearanceComponent
,DoubleSpinnerComponent
,DtDynamicTableComponent
,DtDynamicTreeComponent
,DtMappedCheckboxComponent
,DtPictureComponent
,EnumRadioGroupComponent
,IconLabelComponent
,ImageButtonComponent
,LabelComponent
,LinkComponent
,LongSpinnerComponent
,NullableSpinnerComponent
,NumberCodeMaxLengthSpinnerComponent
,RadioGroupComponent
,RadioGroupComponent
,SelectableLabelComponent
,SeparatorComponent
,SpinnerComponent
,TextComponent
,TextPreviewComponent
,ToolBarComponent
,TreeComponent
public abstract class AbstractControlComponent<M extends IModel,P extends IParameterization,V extends ControlViewModel>
extends StandardComponent<M,P>
The basic class for all control components.
-
Nested Class Summary
Nested classes/interfaces inherited from class com._1c.g5.aef2.standard.components.StandardComponent
StandardComponent.BindingDirection
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractControlComponent
(P parameterization) Creates control component instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract V
Creates control view model instance.protected void
Creates the view models of this component.protected void
Disposes the view models of this component.protected final V
protected void
Handles inbound external validationevent
.protected boolean
Checks is component editable.protected void
refresh()
Refreshes the component.void
setLayoutData
(IAefLayoutData layoutData) Sets the layout data object.void
Updates view models of the component.Methods inherited from class com._1c.g5.aef2.standard.components.StandardComponent
bindList, bindModel, bindValue, bindValue, createDefaultViewModelList, createDefaultViewModelValue, getLayoutData, isEnabled, isPassive, setEnabled, setFocus, updateViewModelStatus
Methods inherited from class com._1c.g5.aef2.components.Component
addComponent, addListener, addViewModel, areChildCommitsEnabled, areChildRefreshEnabled, areComponentsCreated, attachToModel, beginExternalUpdate, checkComponents, checkViewModels, commit, createComponents, detachFromModel, dispose, disposeComponents, endExternalUpdate, getComponents, getModel, getParameterization, getParent, getRunnableQueue, getScene, getServiceEventQualifiers, getViewModels, isDisposed, isInExternalUpdate, queueAndWaitEvent, queueEvent, removeComponent, removeListener, removeViewModel, setChildCommitsEnabled, setChildRefreshEnable, setModel, setParent, setScene, subscribeOnEvents, subscribeOnEvents, unsubscribeOnEvents
-
Constructor Details
-
AbstractControlComponent
Creates control component instance.- Parameters:
parameterization
- the parameterization instance.
-
-
Method Details
-
setLayoutData
Description copied from class:StandardComponent
Sets the layout data object.- Overrides:
setLayoutData
in classStandardComponent<M extends IModel,
P extends IParameterization> - Parameters:
layoutData
- the layout data to set, can benull
.
-
createViewModels
protected void createViewModels()Description copied from class:Component
Creates the view models of this component. Override it to provide a view models of this component.- Overrides:
createViewModels
in classStandardComponent<M extends IModel,
P extends IParameterization>
-
updateViewModels
public void updateViewModels()Description copied from class:StandardComponent
Updates view models of the component. Override it to update view model properties according to current state of the component.- Overrides:
updateViewModels
in classStandardComponent<M extends IModel,
P extends IParameterization>
-
getControlViewModel
- Returns:
- the control view model
-
disposeViewModels
protected void disposeViewModels()Description copied from class:Component
Disposes the view models of this component. Override it to do some additional disposal operations specific to a component.- Overrides:
disposeViewModels
in classStandardComponent<M extends IModel,
P extends IParameterization>
-
refresh
protected void refresh()Refreshes the component. It disposes the view model and recreate it again.
NOTE: The refresh may be used in highly specialized cases when the component creates different view models depending on some conditions. -
isEditable
protected boolean isEditable()Checks is component editable.- Returns:
true
if editable,false
otherwise
-
handleExternalValidationEvent
Description copied from class:StandardComponent
Handles inbound external validationevent
.- Overrides:
handleExternalValidationEvent
in classStandardComponent<M extends IModel,
P extends IParameterization> - Parameters:
event
- the event, cannot benull
.
-
createControlViewModel
Creates control view model instance.- Returns:
- a newly created control view model.
-