Class AbstractDataComponent<CC extends Component>
java.lang.Object
ch.tocco.nice2.model.form.api.components.AbstractComponent<CC>
ch.tocco.nice2.model.form.api.components.AbstractLabeledComponent<CC>
ch.tocco.nice2.model.form.api.components.AbstractDataComponent<CC>
- All Implemented Interfaces:
- Component,- LabeledComponent,- DataComponent
- Direct Known Subclasses:
- AbstractDocumentField,- AmountFieldImpl,- BirthDateFieldImpl,- CheckboxImpl,- CodeFieldImpl,- ComboBoxImpl,- CreatePasswordFieldImpl,- CustomDataFieldImpl,- DateFieldImpl,- DatetimeFieldImpl,- DefaultIteratorComponent,- DefaultTable,- DisplayExpressionFieldImpl,- DisplayFieldImpl,- DurationFieldImpl,- FieldImpl,- HtmlFieldImpl,- ImageFieldImpl,- LatitudeFieldImpl,- LongitudeFieldImpl,- MultiSelectBoxImpl,- NumberFieldImpl,- PathFieldImpl,- PositionSearchFieldImpl,- PulldownDateFieldImpl,- RangeFieldImpl,- RemoteFieldImpl,- SimpleForm,- SingleSelectBoxImpl,- TextAreaImpl,- TextFieldImpl,- TimeFieldImpl
@Deprecated
public abstract class AbstractDataComponent<CC extends Component>
extends AbstractLabeledComponent<CC>
implements DataComponent
Deprecated.
- 
Nested Class SummaryNested classes/interfaces inherited from interface ch.tocco.nice2.model.form.api.components.ComponentComponent.ComponentFilter, Component.DataNavigationType, Component.DisplayType, Component.PositionNested classes/interfaces inherited from interface ch.tocco.nice2.model.form.api.components.LabeledComponentLabeledComponent.UseLabel
- 
Field SummaryFields inherited from class ch.tocco.nice2.model.form.api.components.AbstractComponentattributeProps, extProps, name
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedAbstractDataComponent(boolean acceptChildren, @Nullable Component parent) Deprecated.T
- 
Method SummaryModifier and TypeMethodDescription@Nullable StringDeprecated.Deprecated.Subclasses must override this if they don't want to inherit the NONE value.@Nullable StringDeprecated.Deprecated.Returns the default data type to use for this data component.@Nullable DefaultValueDescriptorDeprecated.@Nullable StringDeprecated.Returns the language for which this field is if it is localized,nullif not.getPath()Deprecated.@Nullable StringDeprecated.Returns the reverse relation asStringif the data type is an entity.Deprecated.booleanDeprecated.booleanDeprecated.booleanDeprecated.booleanDeprecated.Tells if this field is multilingual.protected voidmapAllAttributesTo(Component comp) Deprecated.Copies the attributes of this component into the passed component.voidsetConstriction(@Nullable String constriction) Deprecated.voidsetDataType(String dataType) Deprecated.voidsetDefaultLangOnly(boolean defaultLangOnly) Deprecated.voidDeprecated.Sets the default value for this form component.voidsetIgnoreCopy(boolean ignoreCopy) Deprecated.voidsetLocalizedLanguage(String language) Deprecated.This is called from within the merge process.voidDeprecated.voidsetReverseRelationName(String reverseRelationName) Deprecated.voidsetValidator(AndGroupValidator validator) Deprecated.Methods inherited from class ch.tocco.nice2.model.form.api.components.AbstractLabeledComponentgetLabel, getUseLabel, setLabel, setUseLabelMethods inherited from class ch.tocco.nice2.model.form.api.components.AbstractComponentaddComponent, addComponent, collectDataParts, collectDataParts, createCopy, createCopy, equals, find, findByName, findByType, findFirst, findFirstByName, getAttributeProps, getChild, getChildren, getDisplayType, getEventHandler, getExtProps, getForm, getName, getParent, getParentOrEx, getPosition, getRelativeToPositionName, getScopes, getType, hashCode, hasParent, isForceEditable, isLeaf, isReplace, newInstanceForCopy, overrideParent, removeComponent, replaceComponent, replaceComponent, setAttributeProps, setChildren, setDisplayType, setEventHandler, setExtProps, setForceEditable, setName, setPosition, setRelativeToPositionName, setReplace, setScopes, toStringMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface ch.tocco.nice2.model.form.api.components.ComponentaddComponent, addComponent, collectDataParts, collectDataParts, createCopy, createCopy, find, findByName, findByType, findFirst, findFirstByName, getAttributeProps, getChild, getChildren, getDisplayType, getEventHandler, getExtProps, getForm, getName, getParent, getParentOrEx, getPosition, getRelativeToPositionName, getScopes, getType, hasParent, isForceEditable, isLeaf, isReplace, overrideParent, removeComponent, replaceComponent, replaceComponent, setAttributeProps, setChildren, setDisplayType, setEventHandler, setExtProps, setForceEditable, setName, setPosition, setRelativeToPositionName, setReplace, setScopes, wrapMethods inherited from interface ch.tocco.nice2.model.form.api.components.LabeledComponentgetLabel, getUseLabel, setLabel, setUseLabel
- 
Constructor Details- 
AbstractDataComponentDeprecated.T- Parameters:
- acceptChildren- set this explicit in your constructor. If true, the implementation will accept children, (For exaple an group-component), otherwise not (For example a textfield-component).
- parent- The parent of this component, null if none.
 
 
- 
- 
Method Details
- 
mapAllAttributesToDeprecated.Description copied from class:AbstractComponentCopies the attributes of this component into the passed component.This is used to copy the attributes collected by the xml reading process from "general" field tags into datatype-specific customized fields (mapped by FieldComponentConverter). And also for copying instances, kind of like cloning. Override this in your subclasses. Also, subclasses are required to let their anchestors do their work using super.copyOtherFields(cpy).- Overrides:
- mapAllAttributesToin class- AbstractLabeledComponent<CC extends Component>
- Parameters:
- comp- The new field into which everything needs to be copied.
 
- 
getPathDeprecated.- Specified by:
- getPathin interface- DataComponent
 
- 
getDataTypeDeprecated.- Specified by:
- getDataTypein interface- DataComponent
- Returns:
- The 'datatype' attribute. This can be hardcoded in xml (nulldatasource) or come from the entity field in the entity system, or be null.
 
- 
setDataTypeDeprecated.- Specified by:
- setDataTypein interface- DataComponent
 
- 
getReverseRelationNameDeprecated.Description copied from interface:DataComponentReturns the reverse relation asStringif the data type is an entity. Otherwise NULL will be returned.- Specified by:
- getReverseRelationNamein interface- DataComponent
 
- 
setReverseRelationNameDeprecated.- Specified by:
- setReverseRelationNamein interface- DataComponent
 
- 
hasNonEmptyValidatorpublic boolean hasNonEmptyValidator()Deprecated.- Specified by:
- hasNonEmptyValidatorin interface- DataComponent
- Returns:
- Tells if this data component has a validator, a GroupValidator to be precise, which has at least one entry.
- See Also:
 
- 
getValidatorDeprecated.- Specified by:
- getValidatorin interface- DataComponent
- Returns:
- The outermost group validator which may contain children, or null if none.
- See Also:
 
- 
setValidatorDeprecated.- Specified by:
- setValidatorin interface- DataComponent
 
- 
getDefaultValueDeprecated.- Specified by:
- getDefaultValuein interface- DataComponent
- Returns:
- the default value for this form component as specified in the form xml.
 
- 
setDefaultValueDeprecated.Description copied from interface:DataComponentSets the default value for this form component.- Specified by:
- setDefaultValuein interface- DataComponent
 
- 
setLocalizedLanguageDeprecated.Description copied from interface:DataComponentThis is called from within the merge process.- Specified by:
- setLocalizedLanguagein interface- DataComponent
 
- 
isLocalizedpublic boolean isLocalized()Deprecated.Description copied from interface:DataComponentTells if this field is multilingual. If it is then this field model most likely has siblings; for every system language there is such a field model for the same field.- Specified by:
- isLocalizedin interface- DataComponent
 
- 
getLocalizedLanguageDeprecated.Description copied from interface:DataComponentReturns the language for which this field is if it is localized,nullif not.- Specified by:
- getLocalizedLanguagein interface- DataComponent
- Returns:
- 2-letter iso code in lower case eg 'fr', or nullif not localized.
 
- 
getDefaultDataTypeDeprecated.Description copied from interface:DataComponentReturns the default data type to use for this data component.For example a text-field uses the "string" while the email-field uses the virtual type "email". - Specified by:
- getDefaultDataTypein interface- DataComponent
- Returns:
- The name of the nice2 data type.
 
- 
getConstrictionDeprecated.- Specified by:
- getConstrictionin interface- DataComponent
 
- 
setConstrictionDeprecated.- Specified by:
- setConstrictionin interface- DataComponent
 
- 
setDefaultLangOnlypublic void setDefaultLangOnly(boolean defaultLangOnly) Deprecated.- Specified by:
- setDefaultLangOnlyin interface- DataComponent
 
- 
isDefaultLangOnlypublic boolean isDefaultLangOnly()Deprecated.- Specified by:
- isDefaultLangOnlyin interface- DataComponent
 
- 
setIgnoreCopypublic void setIgnoreCopy(boolean ignoreCopy) Deprecated.- Specified by:
- setIgnoreCopyin interface- DataComponent
 
- 
isIgnoreCopypublic boolean isIgnoreCopy()Deprecated.- Specified by:
- isIgnoreCopyin interface- DataComponent