Class ColumnLookup

All Implemented Interfaces:
Serializable, overit.geocall.marks.MethodExposer, overit.geocall.marks.NameExposer, Badgeable, Hideable, Identified, Tool, overit.geocall.ux.configurability.UIConfigurable, overit.geocall.ux.edm.ModelConfigurable

@Component @Configurable public class ColumnLookup extends Column
This component extends Column and must be used to insert a column with the value of a field of a StaticView or with a DBView loaded in the session. In particular, we take the value of the field corresponding to the name of this element (set with setNAME()) inserted in the TableView in which this column is included. We search for the corresponding row in the StaticView - indicated in this element with setSTATICVIEW() - or in DBView loaded in the session - indicated in this element with setSESSIONDBVIEW() - having this value as the value of its key field. In case of the session DBView it is necessary to indicate which is the key field with setCOLUMNKEY(). The value to show will be the composition of the values of the columns indicated with setCOLUMNLABEL() of the row found.
See Also:
GCApi:
component
  • Field Details

    • _staticview

      protected StaticView _staticview
    • _staticviewpath

      protected String _staticviewpath
    • _dbvStaticview

      protected transient DBView _dbvStaticview
    • _dbviewname

      protected String _dbviewname
    • _sessiondbview

      protected DBView _sessiondbview
    • _columnlabel

      protected String _columnlabel
    • _columnkey

      protected String _columnkey
    • _innertf

      protected MapFormat _innertf
    • _rowlist

      protected ArrayList _rowlist
    • _hideDeprecation

      protected boolean _hideDeprecation
  • Constructor Details

    • ColumnLookup

      public ColumnLookup()
      Creates a new instance of ColumnLookup
  • Method Details

    • setCOLUMNKEY

      public void setCOLUMNKEY(String col)
      Sets the key field to use with the session DBView. This field is used to search for a match with the value entered in the TableView to which this field belongs.
      Parameters:
      col - Name of the field of the session DBView indicated with setSESSIONDBVIEW().
    • setSESSIONDBVIEW

      public void setSESSIONDBVIEW(String name)
      Sets the name of the DBView loaded in session to use to feed the values to show in the column.
      Parameters:
      name - Name of the session DBView.
    • setSTATICVIEW

      public void setSTATICVIEW(String path)
      Sets the StaticView to use to build the ouput of the column.
      Parameters:
      path - String of the path of the StaticView to use. This path use the Factory.
    • setCOLUMNLABEL

      public void setCOLUMNLABEL(String s)
      Sets which of the values of the StaticView are used in the output of the column. If there are multiple values, they are to be separated with a comma.
      Parameters:
      s - String of values to use as output. The values are to be separeted with a comma.
    • setINNERTITLEFORMAT

      public void setINNERTITLEFORMAT(String s)
      Sets the string to show on the hover of the field. The string in output can be dynamics, building it with the values of the fields of the StaticView indicated in this element with setSTATICVIEW() - unlike the setTITLEFORMAT() - that references the fields of the TableView in which the column is inserted. To know how to create a format, see MapFormat.
      Parameters:
      s - String represent the format to be set.
    • setHIDEDEPRECATION

      public void setHIDEDEPRECATION(String s)
      If this attribute is set to "true", in case the value to show is deprecated, it will not be marked in the column.
      Parameters:
      s - String rappresenting the boolean to enable or disable the mark of deprecated values
    • getDefaultOrderMode

      protected String getDefaultOrderMode()
    • getHtmlRow

      public org.apache.ecs.Element getHtmlRow(EntitySet es, int row, int pagerow, ArrayList al)
      Description copied from class: Column
      Returns the html element that defines the row
      Overrides:
      getHtmlRow in class Column
      Parameters:
      es - The EntitySet to which the element belongs
      row - The number of the row
      pagerow - The number ofd the page
      al - The list of values of the row
      Returns:
      The html element that defines the row
    • getBarrato

      protected boolean getBarrato(int iVisibile)
    • getCellElement

      protected org.apache.ecs.Element getCellElement(String o, ArrayList al, int pagerow, boolean barrato)
    • getDefaultErrorValue

      protected String getDefaultErrorValue(Teacher t)
    • getValueFromSessionDBView

      protected String getValueFromSessionDBView(String o, Object val, Teacher t)
    • setupMetaData

      public void setupMetaData(DBView dbv)
      Description copied from class: Column
      Called to init all the field starting form the DBView
      Overrides:
      setupMetaData in class Column
      Parameters:
      dbv - The DBView with all the field used in the init
    • freeResources

      public void freeResources()
      Overrides:
      freeResources in class Column
    • setupTitle

      protected void setupTitle(org.apache.ecs.html.TD td, ArrayList al)
      Overrides:
      setupTitle in class Column
    • getInnerTitleString

      protected String getInnerTitleString()
    • getDefaultLayoutLabel

      public String getDefaultLayoutLabel()
      Overrides:
      getDefaultLayoutLabel in class Column