Class PositionSearchFieldImpl
java.lang.Object
ch.tocco.nice2.model.form.api.components.AbstractComponent<PositionSearchField>
ch.tocco.nice2.model.form.api.components.AbstractLabeledComponent<PositionSearchField>
ch.tocco.nice2.model.form.api.components.AbstractDataComponent<PositionSearchField>
ch.tocco.nice2.optional.geolocation.impl.gui.PositionSearchFieldImpl
- All Implemented Interfaces:
Component
,InputComponent
,LabeledComponent
,DataComponent
,PositionSearchField
public class PositionSearchFieldImpl
extends AbstractDataComponent<PositionSearchField>
implements PositionSearchField
-
Nested Class Summary
Nested classes/interfaces inherited from interface ch.tocco.nice2.model.form.api.components.Component
Component.ComponentFilter, Component.DataNavigationType, Component.DisplayType, Component.Position
Nested classes/interfaces inherited from interface ch.tocco.nice2.model.form.api.components.LabeledComponent
LabeledComponent.UseLabel
-
Field Summary
Fields inherited from class ch.tocco.nice2.model.form.api.components.AbstractComponent
attributeProps, extProps, name
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the default data type to use for this data component.getPath()
protected void
mapAllAttributesTo
(Component comp) Copies the attributes of this component into the passed component.protected PositionSearchField
newInstanceForCopy
(Component parent) Will be called when a copy is requestedComponent.createCopy()
! Create a new instanc of this component, copy the properties and return it.void
setLatitudeFieldname
(String latitudeField) void
setLongitudeFieldname
(String longitudeField) wrap
(ComponentWrapperHandler handler) Wraps the component with the given interceptor handler.Methods inherited from class ch.tocco.nice2.model.form.api.components.AbstractDataComponent
getConstriction, getDataNavigationType, getDefaultValue, getLocalizedLanguage, getReverseRelationName, getValidator, hasNonEmptyValidator, isDefaultLangOnly, isIgnoreCopy, isLocalized, setConstriction, setDataType, setDefaultLangOnly, setDefaultValue, setIgnoreCopy, setLocalizedLanguage, setPath, setReverseRelationName, setValidator
Methods inherited from class ch.tocco.nice2.model.form.api.components.AbstractLabeledComponent
getLabel, getUseLabel, setLabel, setUseLabel
Methods inherited from class ch.tocco.nice2.model.form.api.components.AbstractComponent
addComponent, 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, overrideParent, removeComponent, replaceComponent, replaceComponent, setAttributeProps, setChildren, setDisplayType, setEventHandler, setExtProps, setForceEditable, setName, setPosition, setRelativeToPositionName, setReplace, setScopes, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface ch.tocco.nice2.model.form.api.components.Component
addComponent, addComponent, collectDataParts, collectDataParts, createCopy, createCopy, find, findByName, findByType, findFirst, findFirstByName, getAttributeProps, getChild, getChildren, getDataNavigationType, 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
Methods inherited from interface ch.tocco.nice2.model.form.api.datanavigation.DataComponent
getConstriction, getDefaultValue, getLocalizedLanguage, getReverseRelationName, getValidator, hasNonEmptyValidator, isDefaultLangOnly, isIgnoreCopy, isLocalized, setConstriction, setDataType, setDefaultLangOnly, setDefaultValue, setIgnoreCopy, setLocalizedLanguage, setPath, setReverseRelationName, setValidator
Methods inherited from interface ch.tocco.nice2.model.form.api.components.LabeledComponent
getLabel, getUseLabel, setLabel, setUseLabel
-
Constructor Details
-
PositionSearchFieldImpl
-
-
Method Details
-
newInstanceForCopy
Description copied from class:AbstractComponent
Will be called when a copy is requestedComponent.createCopy()
! Create a new instanc of this component, copy the properties and return it. You don't have to copy the properties which are inherited from the abstract implmentation. Only copy the properties from the concrete implementation.
The parent has to be the parent given in the argument parent- Specified by:
newInstanceForCopy
in classAbstractComponent<PositionSearchField>
- Parameters:
parent
- the parent to set- Returns:
- the new instance
-
getDefaultDataType
Description copied from interface:DataComponent
Returns 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:
getDefaultDataType
in interfaceDataComponent
- Overrides:
getDefaultDataType
in classAbstractDataComponent<PositionSearchField>
- Returns:
- The name of the nice2 data type.
-
wrap
Description copied from interface:Component
Wraps the component with the given interceptor handler.Feel free to add an unwrap() method when needed.
-
mapAllAttributesTo
Description copied from class:AbstractComponent
Copies 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:
mapAllAttributesTo
in classAbstractDataComponent<PositionSearchField>
- Parameters:
comp
- The new field into which everything needs to be copied.
-
getPath
- Specified by:
getPath
in interfaceDataComponent
- Overrides:
getPath
in classAbstractDataComponent<PositionSearchField>
-
getDataType
- Specified by:
getDataType
in interfaceDataComponent
- Overrides:
getDataType
in classAbstractDataComponent<PositionSearchField>
- Returns:
- The 'datatype' attribute. This can be hardcoded in xml (nulldatasource) or come from the entity field in the entity system, or be null.
-
setLatitudeFieldname
- Specified by:
setLatitudeFieldname
in interfacePositionSearchField
-
setLongitudeFieldname
- Specified by:
setLongitudeFieldname
in interfacePositionSearchField
-
getLongitudeFieldname
- Specified by:
getLongitudeFieldname
in interfacePositionSearchField
-
getLatitudeFieldname
- Specified by:
getLatitudeFieldname
in interfacePositionSearchField
-