Class AbstractComponentContainer
java.lang.Object
ch.tocco.nice2.model.form.impl.form2.components.AbstractComponent
ch.tocco.nice2.model.form.impl.form2.components.AbstractCompositeComponent
ch.tocco.nice2.model.form.impl.form2.components.AbstractComponentContainer
- All Implemented Interfaces:
Component,ComponentContainer,CompositeComponent,Cloneable
- Direct Known Subclasses:
ColumnImpl,FieldSetImpl
public abstract class AbstractComponentContainer
extends AbstractCompositeComponent
implements ComponentContainer
Base implementation of
ComponentContainer which contains all shared attributed.-
Nested Class Summary
Nested classes/interfaces inherited from interface ch.tocco.nice2.model.form.api.form2.components.Component
Component.Configuration -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected booleanprotected booleanprotected UseLabel -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDefaultLabel(Form form, TextResources textResources) Return the default label for this component.- `yes`, the label will be displayed.booleanisHidden()If `true`, the column will not be displayed.booleanIf `true`, the field will not be copied in the frontend copy actionbooleanIf `true`, the component will be read only.voidsetHidden(boolean hidden) voidsetIgnoreCopy(boolean ignoreCopy) voidsetReadonly(boolean readonly) voidsetUseLabel(UseLabel useLabel) toString()voidvalidate()Will be called when the form has been built completely.Methods inherited from class ch.tocco.nice2.model.form.impl.form2.components.AbstractCompositeComponent
accept, addComponent, addScope, addScopes, clone, findById, getChildren, getScopes, hasChildren, indexOf, insertComponent, parseScopes, removeComponent, removeScope, removeScopes, replaceComponentMethods inherited from class ch.tocco.nice2.model.form.impl.form2.components.AbstractComponent
getDefaultFormLabel, getId, getLabel, getParent, getPosition, setId, setLabel, setParent, setPositionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ch.tocco.nice2.model.form.api.form2.components.Component
accept, getForm, getId, getLabel, getParent, getPositionMethods inherited from interface ch.tocco.nice2.model.form.api.form2.components.CompositeComponent
findById, getChildren, getScopes, hasChildren
-
Field Details
-
readonly
protected boolean readonly -
ignoreCopy
protected boolean ignoreCopy -
useLabel
-
-
Constructor Details
-
AbstractComponentContainer
public AbstractComponentContainer()
-
-
Method Details
-
isReadonly
public boolean isReadonly()Description copied from interface:ComponentContainerIf `true`, the component will be read only.- Specified by:
isReadonlyin interfaceComponentContainer
-
setReadonly
public void setReadonly(boolean readonly) -
isHidden
public boolean isHidden()Description copied from interface:ComponentContainerIf `true`, the column will not be displayed.- Specified by:
isHiddenin interfaceComponentContainer
-
setHidden
public void setHidden(boolean hidden) -
getUseLabel
Description copied from interface:ComponentContainer- `yes`, the label will be displayed. - `no`, no label will be displayed (but space for label is kept intact - `hide`, the label area is hidden- Specified by:
getUseLabelin interfaceComponentContainer
-
setUseLabel
-
isIgnoreCopy
public boolean isIgnoreCopy()Description copied from interface:ComponentContainerIf `true`, the field will not be copied in the frontend copy action- Specified by:
isIgnoreCopyin interfaceComponentContainer
-
setIgnoreCopy
public void setIgnoreCopy(boolean ignoreCopy) -
toString
-
validate
Description copied from interface:ComponentWill be called when the form has been built completely. Can be used to validate values (and throwModelBuildException) or the fill in default value.- Specified by:
validatein interfaceComponent- Overrides:
validatein classAbstractCompositeComponent- Throws:
ModelBuildException
-
getDefaultLabel
Return the default label for this component. This will be used when no label is specified explicitly in the form. If no label is found, the method will try to predict the missing label based off the implementation in.invalid reference
ComponentContainer#getDefaultFormLabel- Specified by:
getDefaultLabelin interfaceComponentContainer
-