java.lang.Object
overit.geocall.platform.ui.UINode
overit.geocall.ui.Component
overit.geocall.ui.Control
overit.geocall.basic.ui.Container
overit.geocallapp.wfm.core.ux.datacollection.node.container.components.matrix.DataCollectionNodeMatrixContainer
All Implemented Interfaces:
Serializable, overit.geocall.marks.MethodExposer, overit.geocall.marks.NameExposer, Badgeable, Identified, Tool, overit.geocall.ux.configurability.UIConfigurable, overit.geocall.ux.edm.ModelConfigurable

@Component public class DataCollectionNodeMatrixContainer extends Container
Container that manages the events and UI interactions for a data collection matrix node. This class handles the display, editing, and manipulation of matrix data including rows, columns, and headers.
Since:
21.0
See Also:
GCApi:
component
  • Field Details

    • INPUT_NUM_COLUMNS

      public static final String INPUT_NUM_COLUMNS
      Parameter name for the number of columns in the matrix
      See Also:
    • MATRIX_COLUMNS_PREFIX

      public static final String MATRIX_COLUMNS_PREFIX
      Prefix for matrix column identifiers
      See Also:
    • MATRIX_FIELD_ID

      public static final String MATRIX_FIELD_ID
      Field name for the row identifier
      See Also:
    • tvDataCollectionNodeMatrix

      protected TableView tvDataCollectionNodeMatrix
    • panelDataCollectionNodeMatrixHeaders

      protected PanelDataCollectionNodeMatrixHeaders panelDataCollectionNodeMatrixHeaders
      Panel for editing matrix column headers
    • panelDataCollectionNodeColumnsMatrix

      protected PanelDataCollectionNodeColumnsMatrix panelDataCollectionNodeColumnsMatrix
      Panel for editing matrix column values
    • columnTableHeaders

      protected transient Map<Long,Column> columnTableHeaders
      Map of column index to column header components
    • editRowNum

      protected int editRowNum
  • Constructor Details

    • DataCollectionNodeMatrixContainer

      public DataCollectionNodeMatrixContainer()
  • Method Details

    • getBoDataCollectionNodeMatrix

      public BODataCollectionNodeMatrix getBoDataCollectionNodeMatrix()
      Gets the matrix business object, creating it if it doesn't exist.
      Returns:
      The matrix business object
    • setBoDataCollectionNodeMatrix

      public void setBoDataCollectionNodeMatrix(BODataCollectionNodeMatrix boDataCollectionNodeMatrix)
      Sets the matrix business object.
      Parameters:
      boDataCollectionNodeMatrix - The matrix business object to set
    • onOpen

      public void onOpen(Object o)
      Initializes components when the container is opened.
      Overrides:
      onOpen in class Container
      Parameters:
      o - The open parameter
    • showComponent

      protected void showComponent()
      Updates the UI components to reflect the current matrix state. This includes column visibility, headers, and row data.
    • initComponents

      protected void initComponents()
      Initializes UI components and matrix data structures.
    • onNewRow

      public boolean onNewRow(UIMessage uim)
      Handles creating a new row in the matrix.
      Parameters:
      uim - The UI message containing event data
      Returns:
      true if the operation was successful
    • onRowClick

      public boolean onRowClick(UIMessage uim)
      Handles row click event to edit an existing row.
      Parameters:
      uim - The UI message containing event data
      Returns:
      true if the operation was successful
    • postEditRow

      public boolean postEditRow(BODataCollectionNodeMatrixRow matrixRow)
      Callback after editing a row to update the matrix data. Adds a new row or updates an existing one based on the edit state.
      Parameters:
      matrixRow - The edited row data
      Returns:
      true if the operation was successful
    • changeRows

      protected void changeRows()
      Updates the table view with current row data. Clears the view and repopulates it with the current matrix rows.
    • onEditHeader

      public boolean onEditHeader(UIMessage uim)
      Handles editing the column headers.
      Parameters:
      uim - The UI message containing event data
      Returns:
      true if the operation was successful
    • postEditHeader

      public boolean postEditHeader(List<BODataCollectionNodeMatrixColumnHeader> columnHeaders)
      Callback after editing headers to update the matrix data.
      Parameters:
      columnHeaders - The list of edited column headers
      Returns:
      true if the operation was successful
    • changeMatrix

      protected void changeMatrix()
      Updates the matrix display by refreshing columns, headers, and row data.
    • changeHeader

      protected void changeHeader()
      Updates the column headers in the UI based on the current matrix data.
    • onDeleteRow

      public boolean onDeleteRow(UIMessage uim)
      Handles deleting a row from the matrix.
      Parameters:
      uim - The UI message containing event data
      Returns:
      true if the operation was successful
    • initMatrixDBView

      protected void initMatrixDBView()
      Initializes the DBView for the matrix table with the required columns.
    • initColumnTableHeaders

      protected void initColumnTableHeaders()
      Initializes the column header components from the registry.
    • changeColumnsVisibility

      protected void changeColumnsVisibility()
      Updates the visibility of columns based on the current matrix configuration. Shows or hides columns depending on the number of columns defined in the matrix.
    • cleanRowValues

      protected void cleanRowValues()
      Cleans row values that are no longer needed after column changes. Ensures data consistency when the matrix structure changes.