public abstract class Field extends FormComponent
Modifier and Type | Field and Description |
---|---|
protected int |
chooserHeight |
protected java.lang.String |
chooserURL |
protected int |
chooserWidth |
static int |
COLUMNS_DEFAULT |
protected boolean |
editable |
protected FieldRenderer |
fieldRenderer |
protected java.lang.String |
helpHref |
static java.lang.String |
HIDDEN |
protected com.technia.tvc.structurebrowser.form.rangeloader.RangeLoader |
rangeLoader |
static java.lang.String |
REQUEST_PARAM_DELIMITER |
static int |
ROWS_DEFAULT |
protected java.lang.String |
searchForm |
protected java.util.List<java.lang.String> |
visibleIf |
ADDED, INPUT_ID_PREFIX, label, name, order, parent, postProcessEnabled, status, templateEnabled, TOBEREMOVED, UNCHANGED, UPDATED, validationErrors, validationStatus
Constructor and Description |
---|
Field(com.technia.tvc.structurebrowser.form.def.FormComponentDef def)
Default constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addButton(com.technia.tvc.structurebrowser.form.render.Button button) |
void |
appendSelectStatementToList(java.util.List<java.lang.String> list)
If the form is being used in edit mode, this method is responsible for
adding the required select statement(s) in order for the field to be
populated.
|
void |
evaluateEditableExpression(Form form) |
void |
evaluateLabelStyleExpression(Form form) |
void |
forceVisible(Form fc)
Make a field visible forcefully
|
java.lang.String |
getAutoCompleteHandler() |
java.lang.String |
getAutoCompleteSettings() |
java.util.List<com.technia.tvc.structurebrowser.form.render.Button> |
getButtons() |
int |
getChooserHeight() |
java.lang.String |
getChooserURL() |
int |
getChooserWidth() |
java.lang.String |
getDefaultValue() |
java.lang.String |
getDefaultValueHandler() |
java.lang.String |
getDisplayValue() |
java.lang.String |
getEditableExpression() |
java.lang.String |
getLabelStyle() |
boolean |
getLabelStyleExpressionEvaluated() |
java.lang.String[] |
getPostProcesses() |
java.lang.String |
getRangeDisplay() |
java.util.List<RangeValue> |
getRanges() |
java.lang.String |
getRangeSaveValue() |
java.lang.String |
getRangeSeparator() |
com.technia.tvc.structurebrowser.form.render.field.FormComponentRenderer |
getRenderer()
Returns a new, or retrieved from cache, instance of a renderer
|
java.lang.String |
getSearchForm() |
java.lang.Boolean |
getSetting(java.lang.String setting,
boolean defaultValue) |
java.lang.String |
getSetting(java.lang.String setting,
java.lang.String defaultValue) |
java.util.HashMap<java.lang.String,java.lang.String> |
getSettings() |
java.lang.String |
getSize() |
java.lang.String |
getSubFieldId(java.lang.String key) |
java.lang.String |
getTooltipContent() |
java.lang.String |
getTooltipLabel() |
com.technia.tvc.structurebrowser.form.model.Validation |
getValidation() |
java.lang.String |
getValue()
Gets the field value
|
java.util.List<java.lang.String> |
getVisibleIf() |
java.lang.String |
getVisibleIfId() |
boolean |
hasButtons() |
boolean |
hasRange() |
boolean |
hasRangeLoader() |
void |
init() |
protected java.util.List<RangeValue> |
invokeRangeLoader(Form fc)
If an range loader class is present for the field, this class invokes the
class and changes the ranges values.
|
boolean |
isAutoComplete() |
boolean |
isChangeEventEnabled() |
boolean |
isDynamicField() |
boolean |
isEditable() |
boolean |
isEditableText()
Deprecated.
Since 2012.3.0, use isEditable() instead...
|
boolean |
isFromInterface() |
boolean |
isLocked() |
boolean |
isRequired() |
boolean |
isRichText() |
boolean |
isSortRangeValues() |
boolean |
isTemplatable() |
boolean |
isUsesBusinessObject() |
boolean |
isVisibleIfValueField() |
void |
load(Form configuration)
Initializes, or Restores, the field value(s) for this field
|
void |
loadExistingValue(Form configuration,
matrix.db.BusinessObjectWithSelect bows)
This method puts business object select data into the fields value
|
void |
loadExistingValue(Form configuration,
matrix.db.RelationshipWithSelect rws)
This method puts relationship select data into the fields value
|
void |
populateValuesFromRequest(Form fc,
javax.servlet.http.HttpServletRequest request)
Populates the field itself from the corresponding request parameter
|
com.technia.tvc.structurebrowser.form.process.ProcessResultsLog |
postProcess(Form fc,
java.util.List<java.lang.String> oids)
Override this method to add post process logic
|
void |
read(XMLPointer pointer,
Form form)
Restores the state of this field from an XML structure.
|
java.lang.String |
resolveDisplayExpressionFromObjectIds(java.lang.String displayExpression,
java.util.Collection<java.lang.String> ids) |
java.lang.String |
resolveDisplayExpressionFromObjectIds(java.lang.String displayExpression,
java.lang.String value) |
protected java.lang.String |
resolveDisplayValueFromObjectId(java.lang.String objectId) |
java.lang.String |
resolveDisplayValuesFromObjectIds(java.lang.String value) |
static java.lang.String |
resolveObjectNamesFromObjectIds(java.util.Collection<java.lang.String> ids) |
java.lang.String |
resolveObjectNamesFromObjectIds(java.lang.String value) |
void |
save(XMLWriter writer)
Saves the state of this field into XML.
|
void |
setAutoComplete(boolean autoComplete) |
void |
setAutoCompleteHandler(java.lang.String handler) |
void |
setAutoCompleteSettings(java.lang.String settings) |
void |
setChangeEventEnabled(boolean changeEventEnabled) |
void |
setChooserHeight(int chooserHeight) |
void |
setChooserURL(java.lang.String chooserURL) |
void |
setChooserWidth(int chooserWidth) |
void |
setDefaultValue(java.lang.String defaultValue) |
void |
setDefaultValueHandler(java.lang.String defaultValueHandler) |
void |
setDisplayValue(java.lang.String displayValue) |
void |
setDynamicField(boolean isDynamicField) |
void |
setEditable(boolean editable) |
void |
setEditableExpression(java.lang.String editableExpression) |
void |
setEditableText(boolean editableText)
Deprecated.
since 2012.3.0 Use setEditable() instead...
|
void |
setFromInterface(boolean fromInterface) |
void |
setHelpHref(java.lang.String helpHref)
Sets an URL value for where this field's user guide is located
|
void |
setLabelStyle(java.lang.String labelStyle) |
void |
setLabelStyleExpression(java.lang.String labelStyleExpression) |
void |
setLocked(boolean locked) |
void |
setPostProcesses(java.lang.String[] postProcesses) |
void |
setRangeDisplay(java.lang.String rangeDisplay) |
void |
setRangeLoader(com.technia.tvc.structurebrowser.form.rangeloader.RangeLoader rangeLoader)
Sets a class to used for loading a custom set of range values to a field.
|
void |
setRanges(java.util.List<RangeValue> ranges) |
void |
setRangeSaveValue(java.lang.String rangeSaveValue) |
void |
setRangeSeparator(java.lang.String rangeSeparator) |
void |
setRequired(boolean required)
Sets whether the field should be mandatory or not.
|
void |
setRichText(boolean richText) |
void |
setSearchForm(java.lang.String searchForm) |
void |
setSettings(java.util.HashMap<java.lang.String,java.lang.String> settings) |
void |
setSize(java.lang.String size) |
void |
setSortRangeValues(boolean sortRangeValues) |
void |
setTemplatable(boolean templatable) |
void |
setTooltipContent(java.lang.String tooltipContent) |
void |
setTooltipLabel(java.lang.String tooltipLabel) |
void |
setUsesBusinessObject(boolean usesBusinessObject) |
void |
setValidation(com.technia.tvc.structurebrowser.form.model.Validation validation) |
void |
setValue(java.lang.String value)
Sets the field value
|
void |
setValue(java.lang.String displayValue,
java.lang.String value) |
void |
setVisibleIfId(java.lang.String visibleIfId) |
protected void |
toggleVisibleIfFields(java.lang.String value,
Form form) |
java.lang.String |
toString() |
void |
update(Form fc,
java.lang.String value,
boolean updateForm)
Implement this method to implement update logic
|
void |
updateEventAction(Form fc,
java.lang.String key,
java.lang.String value) |
void |
updateFieldValue(Form configuration,
java.lang.String value,
boolean skipValidation,
boolean updateConfiguration)
Updates the field value for this field
|
void |
updateFieldValue(Form configuration,
java.lang.String value,
boolean skipValidation,
boolean updateConfiguration,
boolean updateStatus)
Updates the field value for this field
|
java.lang.String |
validate(Form fc,
java.lang.String value)
Implement this method to give the field custom validation logic
|
boolean |
validateConfigurationInput(Form configuration)
Validate parameters read from configuration xml.
|
addValidationError, addValidationError, addValidationError, addValidationWarning, addValidationWarning, addValidationWarning, clearValidationErrors, compareTo, evaluateRequiredExpression, evaluateVisibleExpression, getComponentDef, getFieldPostProcess, getId, getLabel, getMobileRendererClassName, getName, getOrder, getParent, getRendererClassName, getRequiredExpressionEvaluated, getStatus, getValidationActionErrors, getValidationErrors, getValidationStatus, getVisibilityExpressionEvaluated, isPostProcessEnabled, isTemplateEnabled, isVisible, setFieldPostProcess, setId, setLabel, setName, setOrder, setOrder, setParent, setPostProcessEnabled, setRendererClassName, setRequiredExpression, setStatus, setTemplateEnabled, setVisible, setVisibleExpression
public static final int COLUMNS_DEFAULT
public static final java.lang.String HIDDEN
public static final java.lang.String REQUEST_PARAM_DELIMITER
public static final int ROWS_DEFAULT
protected int chooserHeight
protected java.lang.String chooserURL
protected int chooserWidth
protected boolean editable
protected FieldRenderer fieldRenderer
protected java.lang.String helpHref
protected com.technia.tvc.structurebrowser.form.rangeloader.RangeLoader rangeLoader
protected java.lang.String searchForm
protected java.util.List<java.lang.String> visibleIf
public Field(com.technia.tvc.structurebrowser.form.def.FormComponentDef def) throws com.technia.tvc.structurebrowser.form.exception.FormException
com.technia.tvc.structurebrowser.form.exception.FormException
public void addButton(com.technia.tvc.structurebrowser.form.render.Button button)
public void appendSelectStatementToList(java.util.List<java.lang.String> list) throws com.technia.tvc.structurebrowser.form.exception.FormException
list
- The list to add the statement(s) tocom.technia.tvc.structurebrowser.form.exception.FormException
public void evaluateEditableExpression(Form form) throws com.technia.tvc.structurebrowser.form.exception.FormException
com.technia.tvc.structurebrowser.form.exception.FormException
public void evaluateLabelStyleExpression(Form form) throws com.technia.tvc.structurebrowser.form.exception.FormException
com.technia.tvc.structurebrowser.form.exception.FormException
public java.lang.String getAutoCompleteHandler()
public java.lang.String getAutoCompleteSettings()
public java.util.List<com.technia.tvc.structurebrowser.form.render.Button> getButtons()
public int getChooserHeight()
public java.lang.String getChooserURL()
public int getChooserWidth()
public java.lang.String getDefaultValue()
public java.lang.String getDefaultValueHandler()
public java.lang.String getDisplayValue()
public java.lang.String getEditableExpression()
public java.lang.String getLabelStyle()
public boolean getLabelStyleExpressionEvaluated()
public java.lang.String[] getPostProcesses()
public java.lang.String getRangeDisplay()
public java.util.List<RangeValue> getRanges()
public java.lang.String getRangeSaveValue()
public java.lang.String getRangeSeparator()
public com.technia.tvc.structurebrowser.form.render.field.FormComponentRenderer getRenderer()
FormComponent
getRenderer
in class FormComponent
renderer
public java.lang.String getSearchForm()
public java.util.HashMap<java.lang.String,java.lang.String> getSettings()
public java.lang.String getSetting(java.lang.String setting, java.lang.String defaultValue)
public java.lang.Boolean getSetting(java.lang.String setting, boolean defaultValue)
public java.lang.String getSize()
public java.lang.String getSubFieldId(java.lang.String key)
public java.lang.String getTooltipContent()
public java.lang.String getTooltipLabel()
public com.technia.tvc.structurebrowser.form.model.Validation getValidation()
public java.lang.String getValue()
String
public boolean hasButtons()
public boolean hasRange()
public boolean hasRangeLoader()
public void init() throws com.technia.tvc.structurebrowser.form.exception.FormException
init
in class FormComponent
com.technia.tvc.structurebrowser.form.exception.FormException
protected java.util.List<RangeValue> invokeRangeLoader(Form fc) throws com.technia.tvc.structurebrowser.form.exception.FormException
com.technia.tvc.structurebrowser.form.exception.FormException
public boolean isAutoComplete()
public boolean isChangeEventEnabled()
public boolean isDynamicField()
public boolean isEditable()
@Deprecated public boolean isEditableText()
public boolean isLocked()
public boolean isRequired()
public boolean isTemplatable()
public boolean isRichText()
public boolean isUsesBusinessObject()
public boolean isFromInterface()
public void load(Form configuration) throws com.technia.tvc.structurebrowser.form.exception.FormException
configuration
- The form
itselfcom.technia.tvc.structurebrowser.form.exception.FormException
public void loadExistingValue(Form configuration, matrix.db.BusinessObjectWithSelect bows) throws com.technia.tvc.structurebrowser.form.exception.FormException
configuration
- The form
itselfbows
- A BusinessObjectWithSelect
com.technia.tvc.structurebrowser.form.exception.FormException
public void loadExistingValue(Form configuration, matrix.db.RelationshipWithSelect rws) throws com.technia.tvc.structurebrowser.form.exception.FormException
configuration
- The form
itselfrws
- A RelationshipWithSelect
com.technia.tvc.structurebrowser.form.exception.FormException
public void populateValuesFromRequest(Form fc, javax.servlet.http.HttpServletRequest request)
request
- public com.technia.tvc.structurebrowser.form.process.ProcessResultsLog postProcess(Form fc, java.util.List<java.lang.String> oids) throws java.lang.Exception
fc
- The form
itselfoids
- A list of object id's. These are the results of the formlog
that can contain
information about what has happenedjava.lang.Exception
public void read(XMLPointer pointer, Form form)
Subclasses can (and should) override this method in order to restore the state of the Field correctly.
read
in class FormComponent
pointer
- A pointer
from where you can read the
state from.public java.lang.String resolveDisplayValuesFromObjectIds(java.lang.String value) throws com.technia.tvc.structurebrowser.form.exception.FormException
com.technia.tvc.structurebrowser.form.exception.FormException
protected java.lang.String resolveDisplayValueFromObjectId(java.lang.String objectId) throws com.technia.tvc.structurebrowser.form.exception.FormException
com.technia.tvc.structurebrowser.form.exception.FormException
public java.lang.String resolveObjectNamesFromObjectIds(java.lang.String value)
public static java.lang.String resolveObjectNamesFromObjectIds(java.util.Collection<java.lang.String> ids) throws com.technia.tvc.structurebrowser.form.exception.FormException
com.technia.tvc.structurebrowser.form.exception.FormException
public java.lang.String resolveDisplayExpressionFromObjectIds(java.lang.String displayExpression, java.lang.String value)
public java.lang.String resolveDisplayExpressionFromObjectIds(java.lang.String displayExpression, java.util.Collection<java.lang.String> ids) throws com.technia.tvc.structurebrowser.form.exception.FormException
com.technia.tvc.structurebrowser.form.exception.FormException
public void save(XMLWriter writer)
Subclasses can (and should) override this method in order to save Field specific things. NOTE: Subclasses should not try to "add element attributes" directly without creating their own "elements" in the XML stream.
save
in class FormComponent
writer
- The writer
that you should write the data
intopublic void setAutoComplete(boolean autoComplete)
public void setAutoCompleteHandler(java.lang.String handler)
public void setAutoCompleteSettings(java.lang.String settings)
public void setChangeEventEnabled(boolean changeEventEnabled)
public void setChooserHeight(int chooserHeight)
public void setChooserURL(java.lang.String chooserURL)
public void setChooserWidth(int chooserWidth)
public void setDefaultValue(java.lang.String defaultValue)
public void setDefaultValueHandler(java.lang.String defaultValueHandler)
public void setDisplayValue(java.lang.String displayValue)
public void setDynamicField(boolean isDynamicField)
public void setEditable(boolean editable)
public void setEditableExpression(java.lang.String editableExpression)
@Deprecated public void setEditableText(boolean editableText)
public void setHelpHref(java.lang.String helpHref)
helpHref
- public void setLabelStyle(java.lang.String labelStyle)
public void setLabelStyleExpression(java.lang.String labelStyleExpression)
public void setLocked(boolean locked)
public void setPostProcesses(java.lang.String[] postProcesses)
public void setRangeDisplay(java.lang.String rangeDisplay)
public void setRangeLoader(com.technia.tvc.structurebrowser.form.rangeloader.RangeLoader rangeLoader)
rangeLoader
- public void setRanges(java.util.List<RangeValue> ranges)
public void setRangeSaveValue(java.lang.String rangeSaveValue)
public void setRangeSeparator(java.lang.String rangeSeparator)
public void setRequired(boolean required)
required
- public void setTemplatable(boolean templatable)
public void setRichText(boolean richText)
public void setSearchForm(java.lang.String searchForm)
public void setSettings(java.util.HashMap<java.lang.String,java.lang.String> settings)
public void setSize(java.lang.String size)
public void setTooltipContent(java.lang.String tooltipContent)
public void setTooltipLabel(java.lang.String tooltipLabel)
public void setUsesBusinessObject(boolean usesBusinessObject)
public void setFromInterface(boolean fromInterface)
public void setValidation(com.technia.tvc.structurebrowser.form.model.Validation validation)
public void setValue(java.lang.String value)
value
- public void setValue(java.lang.String displayValue, java.lang.String value)
public void update(Form fc, java.lang.String value, boolean updateForm) throws com.technia.tvc.structurebrowser.form.exception.FormException
fc
- The form
itselfvalue
- The update valuecom.technia.tvc.structurebrowser.form.exception.FormException
protected void toggleVisibleIfFields(java.lang.String value, Form form) throws com.technia.tvc.structurebrowser.form.exception.FormException
com.technia.tvc.structurebrowser.form.exception.FormException
public void updateEventAction(Form fc, java.lang.String key, java.lang.String value) throws com.technia.tvc.structurebrowser.form.exception.FormException
com.technia.tvc.structurebrowser.form.exception.FormException
public void updateFieldValue(Form configuration, java.lang.String value, boolean skipValidation, boolean updateConfiguration)
configuration
- public void updateFieldValue(Form configuration, java.lang.String value, boolean skipValidation, boolean updateConfiguration, boolean updateStatus)
configuration
- public java.lang.String validate(Form fc, java.lang.String value)
fc
- The form
itselfvalue
- he update valuepublic boolean validateConfigurationInput(Form configuration) throws com.technia.tvc.structurebrowser.form.exception.FormException
com.technia.tvc.structurebrowser.form.exception.FormException
public void forceVisible(Form fc) throws com.technia.tvc.structurebrowser.form.exception.FormException
fc
- com.technia.tvc.structurebrowser.form.exception.FormException
public boolean isSortRangeValues()
public void setSortRangeValues(boolean sortRangeValues)
public boolean isVisibleIfValueField()
public java.lang.String getVisibleIfId()
public void setVisibleIfId(java.lang.String visibleIfId)
public java.util.List<java.lang.String> getVisibleIf()
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © Technia AB. All Rights Reserved.