Class DataGridControl

  • All Implemented Interfaces:
    Observer, VariableResolver, IControl, IDataBoundControl, IDataControl, IRenderer

    public class DataGridControl
    extends DataBoundControl
    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:

    <control:lum_dataGrid id="dataGridRelatedTerms" sourceId="termRelation" showHeader="false"/> xml data available for xsl rendering: <control id="dataGridRelatedTerms" showHeader="false" sourceId="termRelation" type="lum_dataGrid"> <control id="8A488A0311D83ABE0111D85DF1C60711" type="lum_interfaceHeaderButtons" .../> <control id="dataGridRelatedTerms.gridtable" type="lum_table"> <tr> <td> <control id="8A488A0311D83ABE0111D85DF1C60713" isVertical="true" listId="LumButton2" type="lum_buttonList" ... /> </td> <td> <control dataId="id" dataRow="1" id="dataGridRelatedTerms.1.id" sourceId="termRelation" type="lum_autoLayoutField" ... /> </td> <td> <control dataId="termId" dataRow="1" id="dataGridRelatedTerms.1.termId" sourceId="termRelation" type="lum_autoLayoutField" ... /> </td> <td> <control dataId="relationType" dataRow="1" id="dataGridRelatedTerms.1.relationType" sourceId="termRelation" type="lum_autoLayoutField" ... /> </td> <td> <control dataId="relatedTermId" dataRow="1" id="dataGridRelatedTerms.1.relatedTermId" sourceId="termRelation" type="lum_autoLayoutField" ... /> </td> </tr> </control> <data> <numberOfRows>1</numberOfRows> <rowsDeleted/> </data> </control>
    Since:
    4.0.4
    Version:
    $Revision: 20825 $ $Date: 2017-12-11 14:43:21 -0200 (Mon, 11 Dec 2017) $
    See Also:
    AutoLayoutFieldControl