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
Constructors Constructor Description DefinitionDrivenComponent(P parameterization)Creates new instance with parameterization.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidattachToModel()Attaches this component to the model.protected voidcreateComponents()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 voiddetachFromModel()Detaches this component from the model.protected voiddisposeComponents()Disposes the child components.IComponent<?>getComponent(Object id)Returns a component with the specified identifier ornullif no component with such identifier is known to the host.ObjectgetId(IComponent<?> component)Returns an identifier for the specified component ornullif not applicableprotected StringgetLabel(ILabeledDefinition definition)Returns the label obtained from definition.IAefLayoutgetLayout()Returns theIAefLayoutinstance.IAefLayoutDatagetLayoutData()Returns theIAefLayoutDatainstance.protected IRuleResultProcessorgetRuleResultProcessor()Returns theIRuleResultProcessorinstance.protected voidhandleRuleResultChanged(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 Detail
-
DefinitionDrivenComponent
public DefinitionDrivenComponent(P parameterization)
Creates new instance with parameterization.- Parameters:
parameterization- the parameterization.
-
-
Method Detail
-
getLayout
public IAefLayout getLayout()
Description copied from class:CompositeComponentReturns theIAefLayoutinstance.- Overrides:
getLayoutin classCompositeComponent<M extends IDefinitionModel,P extends IParameterization>- Returns:
- the layout object or
null.
-
getLayoutData
public IAefLayoutData getLayoutData()
Description copied from class:StandardComponentReturns theIAefLayoutDatainstance.- Overrides:
getLayoutDatain classStandardComponent<M extends IDefinitionModel,P extends IParameterization>- Returns:
- the layout date or
null.
-
getComponent
public IComponent<?> getComponent(Object id)
Description copied from interface:ComponentSearch.IIdentifierHostReturns a component with the specified identifier ornullif no component with such identifier is known to the host.- Specified by:
getComponentin interfaceComponentSearch.IIdentifierHost- Parameters:
id- the identifier- Returns:
- a component with the specified identifier or
nullif not found
-
getId
public Object getId(IComponent<?> component)
Description copied from interface:ComponentSearch.IIdentifierHostReturns an identifier for the specified component ornullif not applicable- Specified by:
getIdin interfaceComponentSearch.IIdentifierHost- Parameters:
component- the component to obtain the identifier for- Returns:
- an identifier for the specified component or
nullif not applicable
-
attachToModel
protected void attachToModel()
Description copied from class:ComponentAttaches this component to the model. Override it to add some listeners to the model.- Overrides:
attachToModelin classComponent<M extends IDefinitionModel,P extends IParameterization>
-
detachFromModel
protected void detachFromModel()
Description copied from class:ComponentDetaches this component from the model. Override it to remove listeners from the model.- Overrides:
detachFromModelin classComponent<M extends IDefinitionModel,P extends IParameterization>
-
createComponents
protected void createComponents()
Description copied from class:ComponentCreates the child components of this component. Override it to fill a component with a child components.Method can be called multiple times.
- Overrides:
createComponentsin classComponent<M extends IDefinitionModel,P extends IParameterization>
-
disposeComponents
protected void disposeComponents()
Description copied from class:ComponentDisposes the child components. Override it to do some additional disposal operations specific to a component.- Overrides:
disposeComponentsin classComponent<M extends IDefinitionModel,P extends IParameterization>
-
getLabel
protected String getLabel(ILabeledDefinition definition)
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 benulllabel- the computed label, cannot benullobjects- the input objects, cannot benull- Returns:
- the field component for the provided definition,
never
null
-
handleRuleResultChanged
protected void handleRuleResultChanged(IRuleResult oldRuleResult, IRuleResult newRuleResult)
Handles the rule result changed.- Parameters:
oldRuleResult- the old rule result, cannot benull.newRuleResult- the new rule result, cannot benull.
-
getRuleResultProcessor
protected IRuleResultProcessor getRuleResultProcessor()
Returns theIRuleResultProcessorinstance.- Returns:
- the
IRuleResultProcessorinstance, nevernull.
-
-