Class ColumnBoolean

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 @Ignore("TRUNCATE") public class ColumnBoolean extends Column
This component extends Column and must be used to represent the boolean values of the cells
See Also:
GCApi:
component
  • Field Details

    • _bvalue

      protected boolean _bvalue
    • _falseIcon

      protected Icon _falseIcon
    • nullIcon

      protected Icon nullIcon
    • states

      protected int states
    • _falseTitle

      protected String _falseTitle
    • nullTitle

      protected String nullTitle
    • _event

      protected String _event
    • _anchor

      protected String _anchor
    • _prompt

      protected String _prompt
    • promptEmpty

      protected boolean promptEmpty
    • _msg

      protected String _msg
    • _param

      protected String _param
    • textName

      protected String textName
    • _colIdx

      protected int _colIdx
    • _any

      protected Any _any
    • _nospin

      protected static String _nospin
  • Constructor Details

    • ColumnBoolean

      public ColumnBoolean()
      Creates a ColumnBoolean
  • Method Details

    • setFALSETITLE

      public void setFALSETITLE(String s)
      Sets the string that appears as a tooltip when the user positions the cursor over a cell of the column with boolean value false. To set the string that appears on the cells with the value true, you must use Control.setTITLE(java.lang.String)
      Using this method the string will be translated, if needed, by the Teacher
      Parameters:
      s - The string that appears as a tooltip when the value of the cell is false
    • setNULLTITLE

      public void setNULLTITLE(String s)
      Sets the string that appears as a tooltip when the user positions the cursor over a cell of the column with value null. To set the string that appears on the cells with the value true, you must use Control.setTITLE(java.lang.String) and for the value false you must use setFALSETITLE(java.lang.String)
      Using this method the string will be translated, if needed, by the Teacher
      Parameters:
      s - The string that appears as a tooltip when the value of the cell is false
    • setVALUE

      public void setVALUE(String s)
      Sets forcibly the value
      Overrides:
      setVALUE in class Column
      Parameters:
      s - A string that represents a boolean value ("true" or "1", "false" or "0").
      If the string is not recognized as a boolean value, it will be used the default value, that is false
    • setFALSEICON

      public void setFALSEICON(String s)
      Sets the IconHD that will be used for the false values. To set the icon that appears on the cells with the value true, you must use Component.setICON(java.lang.String)
      Parameters:
      s - The path, or name, of the icon
    • setNULLICON

      public void setNULLICON(String s)
      Sets the IconHD that will be used for the null values.
      This icon will be shown only if this column is set to works with 3 states. see setSTATES(String)
      To set the icon that appears on the cells with the value true, you must use Component.setICON(java.lang.String)
      Parameters:
      s - The path, or name, of the icon
    • setSTATES

      public void setSTATES(String s)
      Sets the number of possible values for the ColumnBoolean
      Parameters:
      s - The number that indicates the possible values that the field can take.
      Possible values are:
      3: the field's value can be true, false or null. If component has 3 states the null values will be displayed with the nullIcon, see setNULLICON(String)
      2 (default): the field's value can be true or false. With 3 states the null values will be displayed with the falseIcon, see setFALSEICON(String).
    • setEVENT

      public void setEVENT(String s)
      Sets the name of an event associated to the column. By setting an event, the user can click the icon present inside the cell triggering an event that will be sent to the server. An example of use is to exploit the event to invert the value of the cell and then implement the toggle functionality TableView.onToggle(UIMessage))
      Parameters:
      s - The name of the event
    • setMSG

      public void setMSG(String s)
      Sets the string that appears as a message for the event associated to the column.
      If there is a message, when the user clicks the cell's icon a javascript alert will appear, containing the message and two buttons; by pressing one of the two the event will be triggered, while pressing the other will not. Therefore usually this alert is used to request confirmation of proceeding to the user.
      Using this method the message will be translated by the Teacher.
      Parameters:
      s - A string that represents the message contained in the alert that will appears when the user clicks the cell's icon
    • setPARAM

      public void setPARAM(String s)
      Sets a parameter that will be passed to the event associated to the column.
      If there is a param, when the event is triggered it will receives in the HashGetter an entry with key: "param", and value: the string set with this method. The parameter can therefore be managed by the event.
      Parameters:
      s - A string that represents the parameter passed to the event associated to the column
    • setPROMPT

      public void setPROMPT(String s)
      Sets the string that appears as a prompt message for the event associated to the column.
      If there is a prompt, when the user clicks the cell's icon a javascript alert will appear, containing a message (that is the prompt string set with this method), an input field that the user can edit, and two buttons; by pressing one of the two, the event will be triggered, while pressing the other will not. If the event is triggered, it will receives in the HashGetter an entry with key: "prompt", and value: the string that the user has inserted into the input field of the alert. Therefore usually this alert is used to request confirmation of proceeding to the user, that can also insert a parameter, that will be managed by the event.
      Using this method the prompt message will be translated by the Teacher.
      Parameters:
      s - A string that represents the message contained in the alert that will appears when the user clicks the cell's icon
    • setPROMPTEMPTY

      public void setPROMPTEMPTY(String s)
      Sets if the value returned by the prompt can be an empty string ""
      Parameters:
      s - true if you want to allow to return an empty value by the prompt, false otherwise.
    • setANCHOR

      public void setANCHOR(String s)
      Defines the name of the anchor that is used to reposition the scrolling of the page following the execution of the event associated with the Column. The name must correspond to the value of a reference attribute of a Grid or a Section, set using the appropriate set methods (Grid.setREF(java.lang.String), Section.setREF(java.lang.String)).
      The relocation mechanism works only with non-Ajax events, the ones that reload the page.
      Parameters:
      s - The name of the anchor
    • setTEXTNAME

      public void setTEXTNAME(String s)
      Sets the name of another of the columns of the DBView associated with the table that contains the column, whose values will be used as a label positioned inside the cell next to the icon in the corresponding row
      Parameters:
      s - The name of a column whose values will be used as labels
    • 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
    • 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
    • getTD

      public org.apache.ecs.html.TD getTD(EntitySet es, int row, ArrayList al, boolean roll, boolean selected)
      Description copied from class: Column
      Returns the TD cell element
      Overrides:
      getTD in class Column
      Parameters:
      es - The EntitySet to which the element belongs
      row - The number of the row
      al - The list of values of the row
      roll - true if the mouse cursor is positioned over the cell, false otherwise
      selected - true if the row is currently selected, false otherwise
      Returns:
      The TD cell element
    • setMsg

      public void setMsg(String s)
      Sets programmatically the string that appears as a message for the event associated to the column.
      Using this method the message will not be translated by the Teacher.
      See setMSG(java.lang.String) for the meaning of the attribute.
      Parameters:
      s - A string that represents the message contained in the alert that will appears when the user clicks the cell's icon
    • setPrompt

      public void setPrompt(String s)
      Sets programmatically the string that appears as a prompt message for the event associated to the column.
      Using this method the message will not be translated by the Teacher.
      See (java.lang.String) for the meaning of the attribute.
      Parameters:
      s - A string that represents the prompt message contained in the alert that will appears when the user clicks the cell's icon
    • setFalseTitle

      public void setFalseTitle(String s)
      Sets the string that appears as a tooltip when the user positions the cursor over a cell of the column with boolean value false. To set the string that appears on the cells with the value true, you must use Control.setTitle(java.lang.String)
      Using this method the string will not be translated.
      Parameters:
      s - The string that appears as a tooltip when the value of the cell is false
    • getLabelDiv

      protected org.apache.ecs.html.Div getLabelDiv(ArrayList al)
    • setModelProperties

      public void setModelProperties(@NotNull @NotNull DataAttribute dataAttribute)
      Description copied from interface: overit.geocall.ux.edm.ModelConfigurable
      Sets the model properties based on the provided DataAttribute.
      Specified by:
      setModelProperties in interface overit.geocall.ux.edm.ModelConfigurable
      Overrides:
      setModelProperties in class Column
      Parameters:
      dataAttribute - a non-null DataAttribute used to set model properties
    • getDefaultLayoutLabel

      public String getDefaultLayoutLabel()
      Overrides:
      getDefaultLayoutLabel in class Column