|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lumis.doui.control.Control lumis.doui.control.DataControl lumis.doui.control.DataBoundControl lumis.doui.control.datagrid.DataGridControl
public class DataGridControl
Used to render a data grid that allows the end user to manipulate multiple fields and rows of a given source.
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
Field Summary | |
---|---|
protected boolean |
showHeader
|
Fields inherited from class lumis.doui.control.DataControl |
---|
FORCE_CASE_LOWER, FORCE_CASE_NONE, FORCE_CASE_UPPER, forceCase, requestParameterName, UNKNOWN_DATA_TYPE, value, valuePreviouslySet |
Constructor Summary | |
---|---|
DataGridControl()
|
Method Summary | |
---|---|
protected void |
addGridControls()
|
void |
buildSubControls()
For each field specified create a autoLayoutField control. |
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. |
Methods inherited from class lumis.doui.control.DataControl |
---|
convertValueToControlValue, getConverter, getDataType, getDefaultValue, getParameterValue, getProcessActionIds, getRequestParameterName, getValue, getValue, getValueClass, initProcessActionIds, isTrim, loadSubControlFromRequest, loadSubControlsFromRequest, setProcessActionHandlerParameter, setProcessActionHandlerParameter, setTrim, setValue, valueIsArray |
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, 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 |
Field Detail |
---|
protected boolean showHeader
Constructor Detail |
---|
public DataGridControl()
Method Detail |
---|
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 DataBoundControl
PortalException
public boolean isShowHeader()
public void setShowHeader(boolean showHeader)
public boolean isAllowAddRows()
public void setAllowAddRows(boolean allowAddRows)
public boolean isAllowDeleteRows()
public void setAllowDeleteRows(boolean allowDeleteRow)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |