Class DefinitionDrivenComponent<M extends IDefinitionModel,P extends IParameterization>
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.ContainerComponent<M,P>
com._1c.g5.aef2.standard.components.CompositeComponent<M,P>
com._1c.g5.aef2.standard.definitions.components.DefinitionDrivenComponent<M,P>
- Type Parameters:
M
- the model type.P
- the parameterization type.
- All Implemented Interfaces:
IComponent<M>
,IEventChannel
,ComponentSearch.IIdentifierHost
- Direct Known Subclasses:
DtGranularEditorPageSectionComponent
,SectionDefinitionComponent
public class DefinitionDrivenComponent<M extends IDefinitionModel,P extends IParameterization>
extends CompositeComponent<M,P>
implements ComponentSearch.IIdentifierHost
The component implementation that creates sub components by definition.
-
Nested Class Summary
Nested classes/interfaces inherited from class com._1c.g5.aef2.standard.components.StandardComponent
StandardComponent.BindingDirection
-
Constructor Summary
ConstructorsConstructorDescriptionDefinitionDrivenComponent
(P parameterization) Creates new instance with parameterization. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Attaches this component to the model.protected void
Creates the child components of this component.protected ContainerComponent<?,
?> createFieldComponent
(IDefinition definition, String label, Object[] objects) Creates the field component for the provided definition.protected void
Detaches this component from the model.protected void
Disposes the child components.IComponent<?>
getComponent
(Object id) Returns a component with the specified identifier ornull
if no component with such identifier is known to the host.getId
(IComponent<?> component) Returns an identifier for the specified component ornull
if not applicableprotected String
getLabel
(ILabeledDefinition definition) Returns the label obtained from definition.Returns theIAefLayout
instance.Returns theIAefLayoutData
instance.protected IRuleResultProcessor
Returns theIRuleResultProcessor
instance.protected void
handleRuleResultChanged
(IRuleResult oldRuleResult, IRuleResult newRuleResult) Handles the rule result changed.Methods inherited from class com._1c.g5.aef2.standard.components.CompositeComponent
createContainerViewModel, setLayout, setLayoutData, updateViewModels
Methods inherited from class com._1c.g5.aef2.standard.components.ContainerComponent
addComponent, button, button, checkBox, checkBox, combo, createViewModels, disposeChildren, field, field, getContainerViewModel, isEditable, label, label, refreshChildren, separator, spinner, text
Methods inherited from class com._1c.g5.aef2.standard.components.StandardComponent
bindList, bindModel, bindValue, bindValue, createDefaultViewModelList, createDefaultViewModelValue, disposeViewModels, handleExternalValidationEvent, isEnabled, isPassive, setEnabled, setFocus, updateViewModelStatus
Methods inherited from class com._1c.g5.aef2.components.Component
addListener, addViewModel, areChildCommitsEnabled, areChildRefreshEnabled, areComponentsCreated, beginExternalUpdate, checkComponents, checkViewModels, commit, dispose, 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
-
DefinitionDrivenComponent
Creates new instance with parameterization.- Parameters:
parameterization
- the parameterization.
-
-
Method Details
-
getLayout
Description copied from class:CompositeComponent
Returns theIAefLayout
instance.- Overrides:
getLayout
in classCompositeComponent<M extends IDefinitionModel,
P extends IParameterization> - Returns:
- the layout object or
null
.
-
getLayoutData
Description copied from class:StandardComponent
Returns theIAefLayoutData
instance.- Overrides:
getLayoutData
in classStandardComponent<M extends IDefinitionModel,
P extends IParameterization> - Returns:
- the layout date or
null
.
-
getComponent
Description copied from interface:ComponentSearch.IIdentifierHost
Returns a component with the specified identifier ornull
if no component with such identifier is known to the host.- Specified by:
getComponent
in interfaceComponentSearch.IIdentifierHost
- Parameters:
id
- the identifier- Returns:
- a component with the specified identifier or
null
if not found
-
getId
Description copied from interface:ComponentSearch.IIdentifierHost
Returns an identifier for the specified component ornull
if not applicable- Specified by:
getId
in interfaceComponentSearch.IIdentifierHost
- Parameters:
component
- the component to obtain the identifier for- Returns:
- an identifier for the specified component or
null
if not applicable
-
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<M extends IDefinitionModel,
P extends 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<M extends IDefinitionModel,
P extends IParameterization>
-
createComponents
protected void createComponents()Description copied from class:Component
Creates the child components of this component. Override it to fill a component with a child components.Method can be called multiple times.
- Overrides:
createComponents
in classComponent<M extends IDefinitionModel,
P extends IParameterization>
-
disposeComponents
protected void disposeComponents()Description copied from class:Component
Disposes the child components. Override it to do some additional disposal operations specific to a component.- Overrides:
disposeComponents
in classComponent<M extends IDefinitionModel,
P extends IParameterization>
-
getLabel
Returns the label obtained from definition.- Parameters:
definition
- theILabeledDefinition
.- Returns:
- the label.
-
createFieldComponent
protected ContainerComponent<?,?> createFieldComponent(IDefinition definition, String label, Object[] objects) Creates the field component for the provided definition.- Parameters:
definition
- the definition, cannot benull
label
- the computed label, cannot benull
objects
- the input objects, cannot benull
- Returns:
- the field component for the provided definition,
never
null
-
handleRuleResultChanged
Handles the rule result changed.- Parameters:
oldRuleResult
- the old rule result, cannot benull
.newRuleResult
- the new rule result, cannot benull
.
-
getRuleResultProcessor
Returns theIRuleResultProcessor
instance.- Returns:
- the
IRuleResultProcessor
instance, nevernull
.
-