Class ColumnInput

All Implemented Interfaces:
Serializable, overit.geocall.marks.MethodExposer, overit.geocall.marks.NameExposer, Badgeable, Hideable, ValueValidator, Identified, Tool, overit.geocall.ux.configurability.UIConfigurable, overit.geocall.ux.edm.ModelConfigurable
Direct Known Subclasses:
ColumnInputBoolean, ColumnInputMulti, ColumnInputRegExp

@Component public class ColumnInput extends Column implements ValueValidator
This component extends Column and must be used to insert a input field as a column.
See Also:
GCApi:
component
  • Field Details

    • _notnull

      protected boolean _notnull
    • _numeric

      protected boolean _numeric
    • _tabbed

      protected boolean _tabbed
    • _defaultFocus

      protected boolean _defaultFocus
    • _size

      protected int _size
    • _msg

      protected String _msg
    • _indexed

      protected boolean _indexed
    • _autoevent

      protected String _autoevent
    • _autoeventparam

      protected String _autoeventparam
    • _autoeventmsg

      protected String _autoeventmsg
    • _autoeventanchor

      protected String _autoeventanchor
    • _placeholder

      protected String _placeholder
    • _maxlength

      protected int _maxlength
    • workingRow

      protected int workingRow
    • _msgErroreCampo

      protected String _msgErroreCampo
    • _msgCampoObbligatorio

      protected String _msgCampoObbligatorio
  • Constructor Details

    • ColumnInput

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

    • setPLACEHOLDER

      public void setPLACEHOLDER(String s)
      Sets the placeholder, the short hint that usually describes the expected value that appears in the field before the user enters a value. The value will be translated.
      Parameters:
      s - The string that will appear as a placeholder in the field
    • setDEFAULTFOCUS

      public void setDEFAULTFOCUS(String s)
      Indicates if the field is the one that has the focus.
      If you want to force the focus on a specific field you must set the attribute to true, and every other field that appears before that one in the form must have this attribute set to false
      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
    • setNOTNULL

      public void setNOTNULL(String s)
      Set the value for the notnull attribute
      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
    • setMSG

      public void setMSG(String s)
      Sets the message that appears when the user tries to submit a value that is not valid. It is used in classes that extend ColumnInpu. The value will be translated.
      Parameters:
      s - The string that contains the message
    • setMAXLENGTH

      public void setMAXLENGTH(String s)
      Sets the maxlength html attribute of the input field.
      By setting this attribute, the user will not be allowed to enter a content longer than maxlength in the field
      Parameters:
      s - The maxlength attribute expressed in number of characters
    • setSIZE

      public void setSIZE(String s)
      Sets the html size attribute of the input field
      Parameters:
      s - The size attribute expressed in number of characters
    • setTABBED

      public void setTABBED(String s)
      Change the use of tab when the focus is on this field. If this attribute is true, when the user press tab button, the focus moves to the input field of this column but of the next row. If the value is false, the behavior of the focus is standard: when the user press tab button the focus moves to the next field of the same row.
      Parameters:
      s - The string that contains the boolean value. If it is not valid, will be set with default value: "false".
    • setAUTOEVENT

      public void setAUTOEVENT(String s)
      Set an event on the field that is launched when the field lose the focus.
      Parameters:
      s - Name of the event to launch when the field lose the focus.
    • setAUTOEVENTANCHOR

      public void setAUTOEVENTANCHOR(String s)
      Defines the name of the anchor that is used to reposition the scrolling of the page following the execution of the autoevent 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(String), Section.setREF(String)).
      The relocation mechanism works only with non-Ajax events, the ones that reload the page.
      Parameters:
      s - The name of the anchor
    • setAUTOEVENTPARAM

      public void setAUTOEVENTPARAM(String s)
      Set the value that will be passed to the hash getter as a parameter when the autoevent is triggered. The key of the value into hash getter will be "param"
      Parameters:
      s - Value passed to the hash getter as a parameter
    • setAUTOEVENTMSG

      public void setAUTOEVENTMSG(String s)
      Set the message that will appear into a javascript pop up when the autoevent is triggered.
      Parameters:
      s - Message to show into the javascript pop up.
    • setINDEXED

      public void setINDEXED(String s)
      Sets how to build the key for this column. If the value is true, all the values have been passed to the submit and the key to access of the value is build as the append of the name of the column and the number of row. If the value is false, only first value will be passed to the submit with key equal to the name of the column.
      Parameters:
      s - The string that contains the boolean value. If it is not valid, will be set with default value: "false".
    • setup

      protected void setup()
      Description copied from class: Component
      Setup the Component
      Overrides:
      setup in class Column
    • connect

      public void connect()
      Overrides:
      connect in class Component
    • registerValidators

      protected void registerValidators()
    • validate

      protected Double validate(org.apache.ecs.html.Input i, EntitySet es, boolean ro)
    • validate

      protected void validate(org.apache.ecs.html.Input i, EntitySet es, boolean ro, int row)
    • prepareName

      protected String prepareName(int row)
    • prepareName

      protected String prepareName()
    • indexedName

      protected String indexedName()
    • prepareValue

      protected String prepareValue(ArrayList al)
    • checkAutoEvent

      @Deprecated protected void checkAutoEvent(org.apache.ecs.html.Input i)
      Parameters:
      i - UsecheckAutoEvent(Input, int)
    • checkAutoEvent

      protected void checkAutoEvent(org.apache.ecs.html.Input i, int row)
    • 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
    • defaultAttributes

      protected void defaultAttributes(org.apache.ecs.html.Input i, boolean ro, int row)
    • setMsg

      public void setMsg(String s)
      Sets the message that appears when the user tries to submit a value that is not valid. It is used in classes that extend ColumnInpu. The value will not be translated.
      Parameters:
      s - The string that contains the message
    • setPlaceholder

      public void setPlaceholder(String s)
      Sets the placeholder, the short hint that usually describes the expected value that appears in the field before the user enters a value. The value will not be translated.
      Parameters:
      s - The string that will appear as a placeholder in the field
    • validateValue

      public void validateValue(String name, Object value, boolean strong, Map arriving) throws ValidationException
      Description copied from interface: ValueValidator
      Makes the validation to avoid tampering values of a component and it's value.
      When a submit event to the server is triggered, is checked that the component is in the validator set, the value is not changed (if the component is RO), the value is changed with an allow value ecc ecc.
      Specified by:
      validateValue in interface ValueValidator
      Parameters:
      name - The name associated to the component to validate.
      value - The value to validate
      strong - Defines if the validation must be strong or not (for not null component).
      arriving - A Map with all the components (and their values) arriving from submit.
      Throws:
      ValidationException - Raised if the validation failed.
    • validateUnchangingValue

      protected void validateUnchangingValue(String name, Object value, Object published, boolean strong, Map arriving) throws ValidationException
      Throws:
      ValidationException
    • validateChangingValue

      protected void validateChangingValue(String name, Object value, boolean strong, Map arriving) throws ValidationException
      Throws:
      ValidationException
    • validateNotNull

      protected void validateNotNull(String name, Object value, boolean strong, Map arriving) throws ValidationException
      Throws:
      ValidationException
    • validateConcreteValue

      protected void validateConcreteValue(String name, Object value, boolean strong, Map arriving) throws ValidationException
      Throws:
      ValidationException
    • getDefaultLayoutLabel

      public String getDefaultLayoutLabel()
      Overrides:
      getDefaultLayoutLabel in class Column