Class InputCurrency

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

This class, that extends InputRegExp implements the graphic user interface element that allows the user to insert values that must respect the format of currency. For this reason, this field is suggested when the user has to specify a monetary value.
See Also:
GCApi:
component
  • Field Details

    • _any

      protected Any _any
    • _precision

      protected int _precision
    • _decimalSeparator

      protected char _decimalSeparator
    • _groupingSeparator

      protected char _groupingSeparator
    • emptyAsNull

      protected boolean emptyAsNull
    • _useGroupingSeparator

      protected boolean _useGroupingSeparator
    • _less

      protected String _less
    • _lessEqual

      protected String _lessEqual
    • _greater

      protected String _greater
    • _greaterEqual

      protected String _greaterEqual
    • _msgCampoMinore

      protected String _msgCampoMinore
    • _msgCampoMinoreUguale

      protected String _msgCampoMinoreUguale
    • _msgCampoMaggiore

      protected String _msgCampoMaggiore
    • _msgCampoMaggioreUguale

      protected String _msgCampoMaggioreUguale
  • Constructor Details

    • InputCurrency

      public InputCurrency()
      Creates an InputCurrency
  • Method Details

    • setUSEGROUPING

      public void setUSEGROUPING(String s)
      Defines whether to use the thousands separator or not in the input field. The separator is automatically added to the value when the field loses the focus, and is used only in visualization.
      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 one, that is false
    • setLESS

      public void setLESS(String s)
      Sets the constraint about the maximum value. The value inserted by the user is considered valid only if it's lower than the one set by this method.
      Parameters:
      s - The string that represents the maximum limit
    • setLESSEQUAL

      public void setLESSEQUAL(String s)
      Sets the constraint about the maximum value. The value inserted by the user is considered valid only if it's lower or equal than the one set by this method.
      Parameters:
      s - The string that represents the maximum limit
    • setGREATER

      public void setGREATER(String s)
      Sets the constraint about the minimum value. The value inserted by the user is considered valid only if it's higher than the one set by this method.
      Parameters:
      s - The string that represents the minimum limit
    • setGREATEREQUAL

      public void setGREATEREQUAL(String s)
      Sets the constraint about the minimum value. The value inserted by the user is considered valid only if it's higher or equal than the one set by this method.
      Parameters:
      s - The string that represents the minimum limit
    • setEMPTYASNULL

      public void setEMPTYASNULL(String s)
      Boolean flag that indicate if the empty field should be submitted as a null value or as a default value (0).
      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
    • setup

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

      protected String prepareName()
      Overrides:
      prepareName in class Input
    • setPRECISION

      public void setPRECISION(String s)
      Sets the precision for the currency value
      Parameters:
      s - The string that represent the number of digits of the fractional part that the user is allowed to insert
    • prepareValue

      protected String prepareValue()
      Overrides:
      prepareValue in class Input
    • control

      protected void control(org.apache.ecs.html.Input i, EntitySet es)
      Overrides:
      control in class Input
    • validate

      protected void validate(org.apache.ecs.html.Input i, EntitySet es, boolean ro)
      Overrides:
      validate in class InputRegExp
    • buildDisplayScript

      public void buildDisplayScript(StringBuilder sb)
      Every component can add a script to the StringBuilder, script executed when the component is displayed. The method add the script that, if requested, insert in visualization the thousand separator.
      Overrides:
      buildDisplayScript in class Input
      Parameters:
      sb - The StringBuilder on which we want to add the script
    • validateConcreteValue

      protected void validateConcreteValue(String name, Object value, boolean strong, Map arriving) throws ValidationException
      Overrides:
      validateConcreteValue in class InputRegExp
      Throws:
      ValidationException