S
- the source class for this control.@StableMinor(version="12.2", sinceVersion="4.0") public abstract class DataBoundControl<S extends Source> extends DataControl implements Observer, IDataBoundControl
FORCE_CASE_LOWER, FORCE_CASE_NONE, FORCE_CASE_UPPER, forceCase, requestParameterName, UNKNOWN_DATA_TYPE, value, valuePreviouslySet
childControls, controlContainer, controlDefinitionNode, controlResource, douiContext, hasValidatorSubControls, isValid, locale, ON_EVENT_CLOSE_WINDOW, ON_EVENT_LINK, ON_EVENT_POPUP_LINK_OR_RUNTIME_INTERFACE, ON_EVENT_POPUP_RUNTIME_INTERFACE, ON_EVENT_PROCESS_ACTION, ON_EVENT_RENDER_ACTION, ON_EVENT_REPLACE_INTERFACE, ON_EVENT_SCRIPT, ON_EVENT_VALIDATE, onEventScripts, PARAMETER_TYPE_FIRST_SELECTED, PARAMETER_TYPE_GET_VALUE, parentControl, resources, type, VALIDATION_SELECTED_MANY, VALIDATION_SELECTED_ONE
Constructor and Description |
---|
DataBoundControl() |
Modifier and Type | Method and Description |
---|---|
protected void |
autoAddDateTimeValueValidator()
Deprecated.
may be removed in the future
|
protected void |
autoAddDoubleValueValidator()
Deprecated.
may be removed in the future.
|
protected void |
autoAddFileSizeValidator()
Deprecated.
may be removed in the future
|
protected void |
autoAddIntegerValueValidator()
Deprecated.
may be removed in the future.
|
protected void |
autoAddLengthValidator()
Deprecated.
may be removed in the future
|
protected void |
autoAddLongValueValidator()
Deprecated.
may be removed in the future.
|
protected void |
autoAddRequiredValueValidator()
Deprecated.
may be removed in the future
|
protected void |
autoAddValidators() |
void |
buildSubControls() |
protected IConverter |
createConverter()
Creates the converter instance for this control.
|
protected IDouiDataType |
createDataType()
Creates the data type to be used for this control.
|
String |
getDataId()
Returns the fieldId of the source that the data bound control is associated to
|
String |
getFieldName()
Returns the field name that the data control is associated to.
|
protected String |
getProcessActionHandlerParameterName()
Define the name of the process action parameter to be set.
|
protected boolean |
getReload() |
IDataControlRequestHelpDefinition |
getRequestHelpDefinition()
Returns the request parameters help definition.
|
protected Source |
getRuntimeDefaultSource()
Returns default source to use in the context of the current control when
evaluating runtime attributes.
|
S |
getSource()
Returns the source related to this data bound control.
|
protected S |
getSourceById(String sourceId) |
ISourceContext |
getSourceContext()
Returns the source context where this renderer belongs to.
|
protected IConverter |
getUnboundedConverter()
Deprecated.
Since 4.0.10, this method is not used anymore. For
best backward compatibility, this implementation delegates
to
dataType 's IDouiDataType.getConverter() . |
void |
init(Node controlDefinitionNode,
ControlContainer controlContainer,
IControl parentControl) |
void |
loadFromRequest() |
protected void |
setDefaultValue() |
protected void |
setRawValue(Object value)
Sets directly the value in this control.
|
void |
setReload(boolean reload)
Sets the reload flag in the control.
|
void |
setRenderData() |
protected void |
setSourceParameter(String parameterName,
String sourceId)
Set the parameter with the given name in source with the given identifier.
|
void |
setValid(boolean isValid) |
protected void |
setValueFromSource() |
protected void |
setValueFromSource(S source)
Reads the value corresponding to the current control from the control
source.
|
void |
update(Observable src,
Object args) |
convertValueToControlValue, getConverter, getDataType, getDefaultValue, getParameterValue, getProcessActionIds, getRequestParameterName, getValue, getValue, getValueClass, initProcessActionIds, isTrim, loadSubControlFromRequest, loadSubControlsFromRequest, setProcessActionHandlerParameter, setProcessActionHandlerParameter, setProcessActionHandlerParameters, setSourceParameter, setSourceParameters, setTrim, setValue, valueIsArray
appendSubControl, appendSubControls, applyOnEventScripts, convertToStandardValue, createContainer, disconnect, fixedIdentifierRequired, generateControlId, generateControlIdPrefix, getAdditionalParameters, getAdditionalParameters, getAncestor, getChildControls, getClientEventHandlerScript, getControlResource, getId, getLocale, getName, getNamespace, getParentControl, getPrepareForReadScript, getRenderData, getResources, getScriptActionValidation, getStringsToLocalize, getType, getValidationScript, getWindowProperties, getWindowProperties, isRequired, isValid, localize, localizeStrings, processCustomTags, registerOnEventScript, removeChild, removeChildren, resolveVariable, setName, setRuntimeAttributes
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConverter, getProcessActionIds, getValue, getValue, setProcessActionHandlerParameters, setValue
createContainer, disconnect, getChildControls, getControlResource, getId, getName, getParentControl, getPrepareForReadScript, getRenderData, getResources, getType, isValid, registerOnEventScript, removeChild, removeChildren, setRuntimeAttributes
getResources
public void init(Node controlDefinitionNode, ControlContainer controlContainer, IControl parentControl) throws PortalException
init
in interface IControl
init
in class DataControl
PortalException
protected IDouiDataType createDataType() throws PortalException
For a data bound control, if no data type was specified in the control definition, the data type of its associated source field will be used, if any.
createDataType
in class DataControl
PortalException
protected IConverter createConverter() throws PortalException
DataControl
createConverter
in class DataControl
PortalException
protected void setDefaultValue() throws PortalException
setDefaultValue
in class DataControl
PortalException
public void update(Observable src, Object args)
protected void setSourceParameter(String parameterName, String sourceId) throws PortalException
DataControl
setSourceParameter
in class DataControl
parameterName
- the parameter namesourceId
- the source identifierPortalException
@Deprecated protected IConverter getUnboundedConverter() throws PortalException
dataType
's IDouiDataType.getConverter()
.PortalException
createDataType()
,
createConverter()
,
DataControl.getConverter()
protected void setValueFromSource() throws PortalException
PortalException
protected void setValueFromSource(S source) throws PortalException
source
- PortalException
public S getSource() throws PortalException
getSource
in interface IDataBoundControl
PortalObjectNotFoundException
- if the sourceId referenced in the control does not exist.PortalException
protected S getSourceById(String sourceId) throws PortalException
PortalException
protected boolean getReload()
public void setReload(boolean reload) throws PortalException
IDataBoundControl
setReload
in interface IDataBoundControl
reload
- The reload to set.PortalException
public String getDataId() throws PortalException
IDataBoundControl
getDataId
in interface IDataBoundControl
PortalException
public String getFieldName() throws PortalException
getFieldName
in interface IDataBoundControl
PortalException
public void loadFromRequest() throws PortalException
loadFromRequest
in interface IDataControl
loadFromRequest
in class DataControl
PortalException
protected Source getRuntimeDefaultSource()
Control
getRuntimeDefaultSource
in class Control
public void setRenderData() throws PortalException
setRenderData
in interface IControl
setRenderData
in class Control
PortalException
protected void setRawValue(Object value) throws PortalException
The value is set only if it differs of a previously set value. After
the value is set in this control, the source parameters are set
by calling DataControl.setSourceParameters()
.
setRawValue
in class DataControl
value
- the value to set.PortalException
DataControl.valuePreviouslySet
public void setValid(boolean isValid) throws PortalException
setValid
in interface IControl
setValid
in class Control
isValid
- The isValid to set.PortalException
protected String getProcessActionHandlerParameterName() throws PortalException
getProcessActionHandlerParameterName
in class DataControl
PortalException
public void buildSubControls() throws PortalException
buildSubControls
in interface IControl
buildSubControls
in class Control
PortalException
protected void autoAddValidators() throws PortalException
PortalException
@Deprecated protected void autoAddRequiredValueValidator() throws PortalException
PortalException
@Deprecated protected void autoAddIntegerValueValidator() throws PortalException
PortalException
@Deprecated protected void autoAddLongValueValidator() throws PortalException
PortalException
@Deprecated protected void autoAddDoubleValueValidator() throws PortalException
PortalException
@Deprecated protected void autoAddDateTimeValueValidator() throws PortalException
PortalException
@Deprecated protected void autoAddLengthValidator() throws PortalException
PortalException
@Deprecated protected void autoAddFileSizeValidator() throws PortalException
PortalException
public IDataControlRequestHelpDefinition getRequestHelpDefinition() throws PortalException
IDataControl
getRequestHelpDefinition
in interface IDataControl
PortalException
public ISourceContext getSourceContext()
IRenderer
getSourceContext
in interface IRenderer
getSourceContext
in class Control
LumisXP 12.2.0.200122 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.