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
Modifier and TypeFieldDescriptionprotected boolean
protected boolean
protected boolean
protected UseLabel
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetDefaultLabel
(Form form, TextResources textResources) Return the default label for this component.- `yes`, the label will be displayed.boolean
isHidden()
If `true`, the column will not be displayed.boolean
If `true`, the field will not be copied in the frontend copy actionboolean
If `true`, the component will be read only.void
setHidden
(boolean hidden) void
setIgnoreCopy
(boolean ignoreCopy) void
setReadonly
(boolean readonly) void
setUseLabel
(UseLabel useLabel) toString()
void
validate()
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, replaceComponent
Methods inherited from class ch.tocco.nice2.model.form.impl.form2.components.AbstractComponent
getDefaultFormLabel, getId, getLabel, getParent, getPosition, setId, setLabel, setParent, setPosition
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface ch.tocco.nice2.model.form.api.form2.components.Component
accept, getForm, getId, getLabel, getParent, getPosition
Methods 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:ComponentContainer
If `true`, the component will be read only.- Specified by:
isReadonly
in interfaceComponentContainer
-
setReadonly
public void setReadonly(boolean readonly) -
isHidden
public boolean isHidden()Description copied from interface:ComponentContainer
If `true`, the column will not be displayed.- Specified by:
isHidden
in 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:
getUseLabel
in interfaceComponentContainer
-
setUseLabel
-
isIgnoreCopy
public boolean isIgnoreCopy()Description copied from interface:ComponentContainer
If `true`, the field will not be copied in the frontend copy action- Specified by:
isIgnoreCopy
in interfaceComponentContainer
-
setIgnoreCopy
public void setIgnoreCopy(boolean ignoreCopy) -
toString
-
validate
Description copied from interface:Component
Will 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:
validate
in interfaceComponent
- Overrides:
validate
in 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 ininvalid reference
ComponentContainer#getDefaultFormLabel
- Specified by:
getDefaultLabel
in interfaceComponentContainer
-