public class DataGridControl extends DataBoundControl
This control by default reads the primary key and displayed fields of all the rows of the source, rendering a grid where each row corresponds to a source row and each cell represents a field of the source. The input control used for a field value is determined by the field definition.
To persist the changes made while using this control, an appropriate process action handler must be set.
The process action handlers TableUpdateMultiRowDataProcessActionHandler
and
TableAddMultiRowDataProcessActionHandler
may be used to do such persistence. The
TableUpdateMultiRowDataProcessActionHandler
is able to add new rows, update changed rows and
delete removed rows, and is suitable for use in edit interfaces.
The TableAddMultiRowDataProcessActionHandler
adds all rows (it assumes all
rows are new), and is suitable for use in add interfaces.
Example use:
AutoLayoutFieldControl
Modifier and Type | Field and Description |
---|---|
protected boolean |
showHeader |
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 |
---|
DataGridControl() |
Modifier and Type | Method and Description |
---|---|
protected void |
addGridControls() |
void |
buildSubControls()
For each field specified create a autoLayoutField control.
|
IDataControlRequestHelpDefinition |
getRequestHelpDefinition()
Returns the request parameters help definition.
|
void |
init(Node controlDefinitionNode,
ControlContainer controlContainer,
IControl parentControl) |
boolean |
isAllowAddRows() |
boolean |
isAllowDeleteRows() |
boolean |
isShowHeader() |
void |
loadFromRequest()
Loads the number of rows and index of row to delete if exists.
|
protected void |
reloadSubControlsRecursively(IControl currentControl) |
void |
setAllowAddRows(boolean allowAddRows) |
void |
setAllowDeleteRows(boolean allowDeleteRow) |
void |
setProcessActionHandlerParameters(IProcessActionHandler processActionHandler)
Sets the control value as a process action handler parameter.
|
void |
setRenderData()
Sets information for rendering.
|
void |
setShowHeader(boolean showHeader) |
protected void |
setSourceParameter(Source source,
String parameterName)
This control must not set source parameters.
|
protected void |
setValueFromSource(Source source)
Retrieves the number of rows in the source tabular data.
|
autoAddDateTimeValueValidator, autoAddDoubleValueValidator, autoAddFileSizeValidator, autoAddIntegerValueValidator, autoAddLengthValidator, autoAddLongValueValidator, autoAddRequiredValueValidator, autoAddValidators, createConverter, createDataType, getDataId, getFieldName, getProcessActionHandlerParameterName, getReload, getRuntimeDefaultSource, getSource, getSourceById, getSourceContext, getUnboundedConverter, setDefaultValue, setRawValue, setReload, setSourceParameter, setValid, setValueFromSource, update
convertValueToControlValue, getConverter, getDataType, getDefaultValue, getParameterValue, getProcessActionIds, getRequestParameterName, getValue, getValue, getValueClass, initProcessActionIds, isTrim, loadSubControlFromRequest, loadSubControlsFromRequest, setProcessActionHandlerParameter, setProcessActionHandlerParameter, 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, 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 DataBoundControl
PortalException
protected void setValueFromSource(Source source) throws PortalException
setValueFromSource
in class DataBoundControl
PortalException
protected void reloadSubControlsRecursively(IControl currentControl) throws PortalException
PortalException
public void buildSubControls() throws PortalException
buildSubControls
in interface IControl
buildSubControls
in class DataBoundControl
PortalException
protected void addGridControls() throws PortalException
PortalException
public void loadFromRequest() throws PortalException
loadFromRequest
in interface IDataControl
loadFromRequest
in class DataBoundControl
PortalException
public void setRenderData() throws PortalException
setRenderData
in interface IControl
setRenderData
in class DataBoundControl
PortalException
public void setProcessActionHandlerParameters(IProcessActionHandler processActionHandler) throws PortalException
DataControl
setProcessActionHandlerParameters
in interface IDataControl
setProcessActionHandlerParameters
in class DataControl
PortalException
protected void setSourceParameter(Source source, String parameterName) throws PortalException
setSourceParameter
in class DataControl
source
- the sourceparameterName
- the parameter namePortalException
public boolean isShowHeader()
public void setShowHeader(boolean showHeader)
public boolean isAllowAddRows()
public void setAllowAddRows(boolean allowAddRows)
public boolean isAllowDeleteRows()
public void setAllowDeleteRows(boolean allowDeleteRow)
public IDataControlRequestHelpDefinition getRequestHelpDefinition() throws PortalException
IDataControl
getRequestHelpDefinition
in interface IDataControl
getRequestHelpDefinition
in class DataBoundControl
PortalException
LumisXP 12.1.0.191010 - Copyright © 2006–2019 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.