lumis.doui.control
Class DataBoundControl<S extends Source>

Package class diagram package DataBoundControl
java.lang.Object
  extended by lumis.doui.control.Control
      extended by lumis.doui.control.DataControl
          extended by lumis.doui.control.DataBoundControl<S>
Type Parameters:
S - the source class for this control.
All Implemented Interfaces:
Observer, VariableResolver, IControl, IDataBoundControl, IDataControl, IRenderer
Direct Known Subclasses:
AddDynamicListSourceControl, AdministrationListControl, AutoAdministrationListButtonsControl, AutoLayoutAdministrationListControl, AutoLayoutDetailsControl, AutoLayoutFieldControl, AutoLayoutFieldsControl, AutoLayoutGenericAssociationInformationControl, AutoLayoutGenericContentAssociationControl, AutoLayoutLanguageInformationControl, AutoLayoutListControl, AutoLayoutMetaDataInformationControl, AutoLayoutPropertyPageControl, AutoLayoutPublishingInformationControl, BannerControl, ButtonControl, ChatHistoryControl, ChatMessageListControl, ChatSendMessageControl, CheckBoxControl, CheckBoxListControl, CommentsAddControl, CommentsControl, ContentPickerControl, DataGridControl, DateTimePickerControl, DocumentPickerControl, DropDownListControl, DynamicListControl, FieldsControl, FilesPickerControl, FileUploadControl, FilterControl, FiltersControl, ForumButtonVisibilityControl, GenericAclControl, HtmlEditorControl, ImagePickerControl, InputTextControl, InputTextProxyControl, ItemPickerControl, LabelControl, LanguageControl, ListControl, LocalePickerControl, MonthPickerControl, MultiItemPickerControl, NavigationControl, OptionListControl, PaginationControl, PaneControl, PasswordControl, PrimaryKeyControl, PrincipalPickerControl, ProgressControl, ProgressPanelControl, PublishToPrincipalsControl, PublishToPrincipalsListControl, PublishToServiceInstancesControl, PublishToServiceInstancesListControl, RadioButtonControl, SelectChannelChildControl, SelectChannelOrChannelTemplateControl, SelectImportFileControl, SelectParentContentControl, SelectParentContentTreeControl, SelectWorkflowControl, TabularDataControl, TextControl, TimePickerControl, TopicViewCounterControl, VersionControl, WorkflowMetaDataControl, XslFileEditorControl

@StableMinor(version="5.5",
             sinceVersion="4.0")
public abstract class DataBoundControl<S extends Source>
extends DataControl
implements Observer, IDataBoundControl

Control whose data is bound to a source.

Since:
4.0.0

Field Summary
 
Fields inherited from class lumis.doui.control.DataControl
FORCE_CASE_LOWER, FORCE_CASE_NONE, FORCE_CASE_UPPER, forceCase, requestParameterName, UNKNOWN_DATA_TYPE, value, valuePreviouslySet
 
Fields inherited from class lumis.doui.control.Control
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_SCRIPT, onEventScripts, PARAMETER_TYPE_FIRST_SELECTED, PARAMETER_TYPE_GET_VALUE, parentControl, resources, type, VALIDATION_SELECTED_MANY, VALIDATION_SELECTED_ONE
 
Constructor Summary
DataBoundControl()
           
 
Method Summary
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()
           
protected  Source getRuntimeDefaultSource()
          Returns default source to use in the context of the current control when evaluating runtime attributes.
 S getSource()
          Returns the source object that the current control is associated to
protected  S getSourceById(String sourceId)
           
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(Source source, String parameterName)
           
protected  void setSourceParameters()
           
protected  boolean setsSourceParameters()
          Deprecated. Since 4.2.0, this method is no longer used and may be removed in a future version.
 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)
           
 
Methods inherited from class lumis.doui.control.DataControl
convertValueToControlValue, getConverter, getDataType, getDefaultValue, getParameterValue, getProcessActionIds, getRequestParameterName, getValue, getValue, getValueClass, initProcessActionIds, isTrim, loadSubControlFromRequest, loadSubControlsFromRequest, setProcessActionHandlerParameter, setProcessActionHandlerParameter, setProcessActionHandlerParameters, setTrim, setValue, valueIsArray
 
Methods inherited from class lumis.doui.control.Control
appendSubControl, appendSubControls, applyOnEventScripts, convertToStandardValue, createContainer, disconnect, fixedIdentifierRequired, generateControlId, getAdditionalParameters, getAdditionalParameters, getAncestor, getChildControls, getClientEventHandlerScript, getControlResource, getId, getLocale, getNamespace, getParentControl, getPrepareForReadScript, getRenderData, getResources, getScriptActionValidation, getScriptGetValues, getScriptGetValuesFunctionImplementation, getScriptGetValuesFunctionName, getScriptGetValuesRegistration, getSourceContext, getStringsToLocalize, getType, getValidationScript, isValid, localize, localizeStrings, processCustomTags, registerOnEventScript, removeChild, removeChildren, resolveVariable, setRuntimeAttributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface lumis.doui.control.IDataControl
getConverter, getProcessActionIds, getValue, getValue, setProcessActionHandlerParameters, setValue
 
Methods inherited from interface lumis.doui.control.IControl
createContainer, disconnect, getChildControls, getControlResource, getId, getParentControl, getPrepareForReadScript, getRenderData, getResources, getType, isValid, registerOnEventScript, removeChild, removeChildren, setRuntimeAttributes
 
Methods inherited from interface lumis.doui.render.IRenderer
getResources, getSourceContext
 

Constructor Detail

DataBoundControl

public DataBoundControl()
Method Detail

init

public void init(Node controlDefinitionNode,
                 ControlContainer controlContainer,
                 IControl parentControl)
          throws PortalException
Specified by:
init in interface IControl
Overrides:
init in class DataControl
Throws:
PortalException

createDataType

protected IDouiDataType createDataType()
                                throws PortalException
Creates the data type to be used for this control.

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.

Overrides:
createDataType in class DataControl
Returns:
the data type to be used for this control, or null if this control does not knows which data type to use.
Throws:
PortalException

createConverter

protected IConverter createConverter()
                              throws PortalException
Description copied from class: DataControl
Creates the converter instance for this control.

Overrides:
createConverter in class DataControl
Returns:
the converter instance or null if this control has no converter.
Throws:
PortalException

setDefaultValue

protected void setDefaultValue()
                        throws PortalException
Overrides:
setDefaultValue in class DataControl
Throws:
PortalException

update

public void update(Observable src,
                   Object args)
Specified by:
update in interface Observer

setSourceParameters

protected void setSourceParameters()
                            throws PortalException
Throws:
PortalException

setsSourceParameters

@Deprecated
protected boolean setsSourceParameters()
                                throws PortalException
Deprecated. Since 4.2.0, this method is no longer used and may be removed in a future version.

Throws:
PortalException

getUnboundedConverter

protected IConverter getUnboundedConverter()
                                    throws PortalException
Deprecated. Since 4.0.10, this method is not used anymore. For best backward compatibility, this implementation delegates to dataType's IDouiDataType.getConverter().

Returns the converter to be used when this control is not bound to a source field.

Returns:
the converter to be used when this control is not bound to a source field.
Throws:
PortalException
Since:
4.0.5
See Also:
createDataType(), createConverter(), DataControl.getConverter()

setSourceParameter

protected void setSourceParameter(Source source,
                                  String parameterName)
                           throws PortalException
Throws:
PortalException

setValueFromSource

protected void setValueFromSource()
                           throws PortalException
Throws:
PortalException

setValueFromSource

protected void setValueFromSource(S source)
                           throws PortalException
Reads the value corresponding to the current control from the control source. By default the value that is taken from the source is from the first row of the source tabular data. However, if the control has the dataRow specified, the value taken from the source tabular data corresponds to specified row.

Parameters:
source -
Throws:
PortalException

getSource

public S getSource()
                           throws PortalException
Description copied from interface: IDataBoundControl
Returns the source object that the current control is associated to

Specified by:
getSource in interface IDataBoundControl
Returns:
Throws:
PortalException

getSourceById

protected S getSourceById(String sourceId)
                                  throws PortalException
Throws:
PortalException

getReload

protected boolean getReload()
Returns:
Returns the reload.

setReload

public void setReload(boolean reload)
               throws PortalException
Description copied from interface: IDataBoundControl
Sets the reload flag in the control.

Specified by:
setReload in interface IDataBoundControl
Parameters:
reload - The reload to set.
Throws:
PortalException

getDataId

public String getDataId()
                 throws PortalException
Description copied from interface: IDataBoundControl
Returns the fieldId of the source that the data bound control is associated to

Specified by:
getDataId in interface IDataBoundControl
Returns:
Returns the dataId.
Throws:
PortalException

getFieldName

public String getFieldName()
                    throws PortalException
Returns the field name that the data control is associated to. If the control has a fieldName attribute specified, that value is translated and returned. If not, the field name is taken from the source definition.

Specified by:
getFieldName in interface IDataBoundControl
Returns:
Throws:
PortalException

loadFromRequest

public void loadFromRequest()
                     throws PortalException
Specified by:
loadFromRequest in interface IDataControl
Overrides:
loadFromRequest in class DataControl
Throws:
PortalException

getRuntimeDefaultSource

protected Source getRuntimeDefaultSource()
Description copied from class: Control
Returns default source to use in the context of the current control when evaluating runtime attributes.

Overrides:
getRuntimeDefaultSource in class Control
Returns:
the default source, or null if there is no source.

setRenderData

public void setRenderData()
                   throws PortalException
Specified by:
setRenderData in interface IControl
Overrides:
setRenderData in class Control
Throws:
PortalException

setRawValue

protected void setRawValue(Object value)
                    throws PortalException
Sets directly the value in this control.

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 setSourceParameters().

Overrides:
setRawValue in class DataControl
Parameters:
value - the value to set.
Throws:
PortalException
See Also:
DataControl.valuePreviouslySet

setValid

public void setValid(boolean isValid)
              throws PortalException
Specified by:
setValid in interface IControl
Overrides:
setValid in class Control
Parameters:
isValid - The isValid to set.
Throws:
PortalException

getProcessActionHandlerParameterName

protected String getProcessActionHandlerParameterName()
                                               throws PortalException
Define the name of the process action parameter to be set. If the control has a dataRow attribute will set the parameter with the following name "dataRow.dataId". Otherwise, the control´s dataId attribute will be used.

Overrides:
getProcessActionHandlerParameterName in class DataControl
Returns:
parameter name
Throws:
PortalException

buildSubControls

public void buildSubControls()
                      throws PortalException
Specified by:
buildSubControls in interface IControl
Overrides:
buildSubControls in class Control
Throws:
PortalException

autoAddValidators

protected void autoAddValidators()
                          throws PortalException
Throws:
PortalException

autoAddRequiredValueValidator

protected void autoAddRequiredValueValidator()
                                      throws PortalException
Deprecated. may be removed in the future

Throws:
PortalException

autoAddIntegerValueValidator

protected void autoAddIntegerValueValidator()
                                     throws PortalException
Deprecated. may be removed in the future.

Throws:
PortalException

autoAddLongValueValidator

protected void autoAddLongValueValidator()
                                  throws PortalException
Deprecated. may be removed in the future.

Throws:
PortalException

autoAddDoubleValueValidator

protected void autoAddDoubleValueValidator()
                                    throws PortalException
Deprecated. may be removed in the future.

Throws:
PortalException

autoAddDateTimeValueValidator

protected void autoAddDateTimeValueValidator()
                                      throws PortalException
Deprecated. may be removed in the future

Throws:
PortalException

autoAddLengthValidator

protected void autoAddLengthValidator()
                               throws PortalException
Deprecated. may be removed in the future

Throws:
PortalException

autoAddFileSizeValidator

protected void autoAddFileSizeValidator()
                                 throws PortalException
Deprecated. may be removed in the future

Throws:
PortalException


Lumisportal  5.5.0.091130 - Copyright © 2001-2007, Lumis. All Rights Reserved.