Class ValueComponent
- 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,VM>
-
- com._1c.g5.v8.dt.ui.aef.component.AbstractDtSelectComponent<IValueModel,IParameterization,ValueControlViewModel>
-
- com._1c.g5.v8.dt.md.ui.aef.components.value.ValueComponent
-
- All Implemented Interfaces:
IComponent<IValueModel>
,IEventChannel
public class ValueComponent extends AbstractDtSelectComponent<IValueModel,IParameterization,ValueControlViewModel>
The component for editingValue
objects viaIValueModel
. It produces different view models depending on the current state of value model. It is expandable component, so the amount of editableValue
objects can be increased with registering a newIValueComponentPart
s.- See Also:
IValueComponentPart
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com._1c.g5.aef2.standard.components.StandardComponent
StandardComponent.BindingDirection
-
-
Field Summary
-
Fields inherited from class com._1c.g5.v8.dt.ui.aef.component.AbstractDtSelectComponent
CLEAR_BUTTON_COMMAND_ID, DEFAULT_CONTEXT, OPEN_BUTTON_COMMAND_ID, SELECT_BUTTON_COMMAND_ID
-
-
Constructor Summary
Constructors Constructor Description ValueComponent(IParameterization parameterization)
Creates a new component.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
attachToModel()
Attaches this component to the model.protected Collection<ButtonItemViewModel>
createButtons()
Creates a collection of theButtonItemViewModel
that will be added to the component view model.protected ValueControlViewModel
createControlViewModel()
Creates control view model instance.protected void
detachFromModel()
Detaches this component from the model.protected void
handleButtonClicked(IViewModel viewModel)
Handles the button clicked event.void
registerPart(IValueComponentPart<? extends ValueControlViewModel,? extends IValueModel,? extends Value> part)
Registers the component part.-
Methods inherited from class com._1c.g5.v8.dt.ui.aef.component.AbstractDtSelectComponent
createButtonItem, createClearButtonItem, createOpenButtonItem, createSelectButtonItem, createViewModels, dispose
-
Methods inherited from class com._1c.g5.aef2.standard.components.AbstractControlComponent
disposeViewModels, getControlViewModel, handleExternalValidationEvent, isEditable, refresh, setLayoutData, updateViewModels
-
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, beginExternalUpdate, checkComponents, checkViewModels, commit, createComponents, 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 Detail
-
ValueComponent
public ValueComponent(IParameterization parameterization)
Creates a new component.- Parameters:
parameterization
- the parameterization.
-
-
Method Detail
-
registerPart
public void registerPart(IValueComponentPart<? extends ValueControlViewModel,? extends IValueModel,? extends Value> part)
Registers the component part.- Parameters:
part
- the part.
-
handleButtonClicked
protected void handleButtonClicked(IViewModel viewModel)
Description copied from class:AbstractDtSelectComponent
Handles the button clicked event.- Overrides:
handleButtonClicked
in classAbstractDtSelectComponent<IValueModel,IParameterization,ValueControlViewModel>
- Parameters:
viewModel
- the view model of the event sender.
-
createControlViewModel
protected ValueControlViewModel createControlViewModel()
Description copied from class:AbstractControlComponent
Creates control view model instance.- Specified by:
createControlViewModel
in classAbstractControlComponent<IValueModel,IParameterization,ValueControlViewModel>
- Returns:
- a newly created control view model.
-
attachToModel
protected void attachToModel()
Description copied from class:Component
Attaches this component to the model. Override it to add some listeners to the model.- Overrides:
attachToModel
in classComponent<IValueModel,IParameterization>
-
detachFromModel
protected void detachFromModel()
Description copied from class:Component
Detaches this component from the model. Override it to remove listeners from the model.- Overrides:
detachFromModel
in classComponent<IValueModel,IParameterization>
-
createButtons
protected Collection<ButtonItemViewModel> createButtons()
Description copied from class:AbstractDtSelectComponent
Creates a collection of theButtonItemViewModel
that will be added to the component view model.- Overrides:
createButtons
in classAbstractDtSelectComponent<IValueModel,IParameterization,ValueControlViewModel>
- Returns:
- the collection of the
ButtonItemViewModel
.
-
-