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 VCreates control view model instance.protected voidCreates the view models of this component.protected voidDisposes the view models of this component.protected final Vprotected voidHandles inbound external validationevent.protected booleanChecks is component editable.protected voidrefresh()Refreshes the component.voidsetLayoutData(IAefLayoutData layoutData) Sets the layout data object.voidUpdates 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, updateViewModelStatusMethods 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:StandardComponentSets the layout data object.- Overrides:
setLayoutDatain classStandardComponent<M extends IModel,P extends IParameterization> - Parameters:
layoutData- the layout data to set, can benull.
-
createViewModels
protected void createViewModels()Description copied from class:ComponentCreates the view models of this component. Override it to provide a view models of this component.- Overrides:
createViewModelsin classStandardComponent<M extends IModel,P extends IParameterization>
-
updateViewModels
public void updateViewModels()Description copied from class:StandardComponentUpdates view models of the component. Override it to update view model properties according to current state of the component.- Overrides:
updateViewModelsin classStandardComponent<M extends IModel,P extends IParameterization>
-
getControlViewModel
- Returns:
- the control view model
-
disposeViewModels
protected void disposeViewModels()Description copied from class:ComponentDisposes the view models of this component. Override it to do some additional disposal operations specific to a component.- Overrides:
disposeViewModelsin 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:
trueif editable,falseotherwise
-
handleExternalValidationEvent
Description copied from class:StandardComponentHandles inbound external validationevent.- Overrides:
handleExternalValidationEventin 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.
-