Class SimpleTable

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 SimpleTable extends DAContainer
This class extends DAContainer and implements a table, the user interface element that allows to arranges the data in tabular format and manages the behaviors of the child components, that are mainly columns and some particular kind of buttons.
The SimpleTable keeps all its data in memory, so it can be considered as a ?client? component and must be used when the amount of data is not excessive. Its recommended to use TableView or ServerTableView instead of this component because these two implements a whole series of additional interactions (like Ajax events) and better user interface behaviors that make it the right object to use in all cases, both when the data is loaded in memory, and when they are saved in database and loaded on demand.
See Also:
GCApi:
component
  • Field Details

    • _originalRow

      protected HashGetter _originalRow
    • _invalidateTable

      protected String _invalidateTable
    • _form

      protected Form _form
    • _formName

      protected String _formName
    • _panel

      protected Panel _panel
    • _panelName

      protected String _panelName
    • _tableName

      protected String _tableName
    • _isInsert

      protected boolean _isInsert
    • _oldmode

      protected boolean _oldmode
  • Constructor Details

    • SimpleTable

      public SimpleTable()
  • Method Details

    • setINVALIDATETABLE

      public void setINVALIDATETABLE(String s)
      Sets the table to invalidate.
      Parameters:
      s - String containing the name of the table to invalidate.
    • setFORM

      public void setFORM(String s)
      Sets the form being associated with the SimpleTable.
      Parameters:
      s - String containing the name of the form.
    • setPANEL

      public void setPANEL(String s)
      Sets the panel being associated with the SimpleTable.
      Parameters:
      s - String containing the name of the panel.
    • setTABLE

      public void setTABLE(String s)
      Sets the table being associated with the SimpleTable.
      Parameters:
      s - String containing the name of the table.
    • onOpen

      public void onOpen(Object o)
      Description copied from class: Container
      Method called when is executed the WindowManager.push(overit.geocall.basic.ui.Window, java.lang.Object) of the Window that contains the Container. It calls the onOpen(o) method of all the Container's childrens.
      If a page is opened through the process of a route, it is possible that the route was called with params to pass to the page.
      The route params could be passed specifying them like query string's param on the url, using commas or the '=' character, to separate the keys and the values. Valid syntaxs are: "&params=KEY1,VAL1,KEY2,VAL2" or "&params=KEY1=VAL1,KEY2=VAL2"
      In that case it is possible to retrieve those params via the WindowManager.getRouteParams() method that returns an HashGetter with the params passed as parameters.
      For example it's possible to retrieve and use the params in this way: HashGetter hg = getWM().getRouteParams();
      String val1 = hg.getString("key1",null);
      String val2 = hg.getString("key2",null);
      Overrides:
      onOpen in class Container
      Parameters:
      o - Object received from the caller
    • searchMissingComponents

      protected void searchMissingComponents(Component c)
    • checkComponent

      protected void checkComponent(Component c)
    • getComponentsFromRegistry

      protected void getComponentsFromRegistry()
    • onOpenChildContainer

      public void onOpenChildContainer(Container c)
      Description copied from class: Container
      Called by the Container.onOpen(java.lang.Object) method and is used to implements some actions on the Contianer's children. This base implementation does nothing.
      Overrides:
      onOpenChildContainer in class DAContainer
      Parameters:
      c - The Container to implement the operations on the children
    • onDelete

      public boolean onDelete(Object o)
      Description copied from class: DAContainer
      Manages the event of deleting a row.
      Overrides:
      onDelete in class DAContainer
      Parameters:
      o - The row to delete
      Returns:
      true
    • onDeleteException

      public void onDeleteException(DAValidateException e)
      Overrides:
      onDeleteException in class DAContainer
    • onDeleteException

      public void onDeleteException(DAException e)
      Overrides:
      onDeleteException in class DAContainer
    • onNew

      public boolean onNew(Object oParam)
      Description copied from class: DAContainer
      Manages the event of adding a new row by opening a new page. No parameters will be passed to the onOpen of the xml page.
      Overrides:
      onNew in class DAContainer
      Parameters:
      oParam - Not used
      Returns:
      true if was able to perform the event, false otherwise
    • onModify

      public boolean onModify(Object oParam)
      Description copied from class: DAContainer
      Manages the event of modifying a row by opening a new page. The parameters of the selected row will be passed to the onOpen of the xml page.
      Overrides:
      onModify in class DAContainer
      Parameters:
      oParam - The row to modify
      Returns:
      true if was able to perform the event, false otherwise
    • onCancel

      public boolean onCancel(Object oParam)
      Manages the event of clear the possible form associated to the Simpletable.
      Parameters:
      oParam - Not used
      Returns:
      false
    • onClose

      public boolean onClose(Object oParam)
      Manages the event of closing the panel.
      Parameters:
      oParam - Not used
      Returns:
      true
    • insertValues

      protected HashGetter insertValues(HashGetter hg)
    • updateValues

      protected HashGetter updateValues(HashGetter hg)
    • onSave

      public boolean onSave(Object oParam)
      Description copied from class: DAContainer
      Manages the event of insert or update a row.
      Overrides:
      onSave in class DAContainer
      Parameters:
      oParam - The row to insert or update
      Returns:
      true
    • onUpdateException

      public void onUpdateException(DAValidateException e)
      Defines a DAValidateException to display through an alert, when an update operations failed.
      Parameters:
      e - The exception to display.
    • onUpdateException

      public void onUpdateException(DAException e)
    • onInsertException

      public void onInsertException(DAValidateException e)
      Display a DAValidateException through an alert, when an insert operations failed.
      Parameters:
      e - The exception to display.
    • onInsertException

      public void onInsertException(DAException e)
      Defines a DAValidateException to throw, when an insert operations failed.
      Parameters:
      e - The exception to throw.
    • afterUpdate

      protected void afterUpdate(HashGetter values)
    • afterInsert

      protected void afterInsert(HashGetter values)