Class InputRadio

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
Direct Known Subclasses:
InputCheckBoxes

@Component public class InputRadio extends Input implements Arrangeable
This class extends Input and implements the graphic user interface element that render a classic radio button. It is usually used in combination with other radio buttons that describes a set of related options. Only one radio button in a given group can be selected at the same time.
See Also:
GCApi:
component
  • Field Details

    • BLANK_SPACE

      protected static final String BLANK_SPACE
      See Also:
    • _type

      protected int _type
    • _selected

      protected boolean _selected
    • _iColumns

      protected int _iColumns
    • _iCountRow

      protected int _iCountRow
    • _autoevent

      protected String _autoevent
    • _autoeventparam

      protected String _autoeventparam
    • _vertical

      protected boolean _vertical
    • _firstInputId

      protected String _firstInputId
    • _lastcalltotalelements

      protected int _lastcalltotalelements
  • Constructor Details

    • InputRadio

      public InputRadio()
      Creates an InputRadio
  • Method Details

    • setAUTOEVENT

      public void setAUTOEVENT(String s)
      Sets the name of an event associated to the field and triggered when the user changes its value. By setting an autoevent, a form submit will be automatically performed when the field loses the focus.
      Parameters:
      s - The name of the event triggered when the user changes the field value
    • setAUTOEVENTPARAM

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

      public void setSELECTED(String s)
      Defines if the button is the one selected or not.
      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
    • setVERTICAL

      public void setVERTICAL(String s)
      Sets the arranging method used to position the buttons.
      Parameters:
      s - true, that is the default value, to arrange the buttons vertically (from top to bottom); false to arrange the buttons horizontally (from left to right).
      If the string value is not recognized as a boolean value, the default value will be used.
    • setCOLS

      public void setCOLS(String s)
      Sets the number of columns used to organize the radio buttons
      Parameters:
      s - The number of columns. The default value is 1.
    • setTYPE

      public void setTYPE(String s)
      Defines the type of the field values.
      Parameters:
      s - Accepted values are: "long" (that is also the default one), to state that the values are Long values; "string" to state that the values are String values.
    • getDescriptionHtml

      public org.apache.ecs.Element getDescriptionHtml(Object generationhandle, EntitySet es)
      Description copied from class: Input
      Implements the interface Arrangeable. It returns the html code that represents the component description i.e. the formatted label of the field
      Specified by:
      getDescriptionHtml in interface Arrangeable
      Overrides:
      getDescriptionHtml in class Input
      Parameters:
      generationhandle - The handle of the generation
      es - The EntitySet to which the element belongs
      Returns:
      The html code of the label, or null if the field don't have it or is hidden
    • getVisibleDescriptionHtml

      protected org.apache.ecs.Element getVisibleDescriptionHtml(Object generationhandle, EntitySet es)
      Overrides:
      getVisibleDescriptionHtml in class Input
    • getContentHtml

      public org.apache.ecs.Element getContentHtml(Object generationhandle, EntitySet es)
      Description copied from class: Input
      Implements the interface Arrangeable. It returns the html code that represents the active part of the input field, i.e. the field and the validation scripts
      Specified by:
      getContentHtml in interface Arrangeable
      Overrides:
      getContentHtml in class Input
      Parameters:
      generationhandle - The handle of the generation
      es - The EntitySet to which the element belongs
      Returns:
      The html code of the input field or null if the field don't have a graphical representation
    • getHiddenHtml

      public org.apache.ecs.Element getHiddenHtml(Object generationhandle, EntitySet es)
      Description copied from class: Input
      Implements the interface Arrangeable. It returns the hidden but active html part of an hidden input field.
      Specified by:
      getHiddenHtml in interface Arrangeable
      Overrides:
      getHiddenHtml in class Input
      Parameters:
      generationhandle - The handle of the generation
      es - The EntitySet to which the element belongs
      Returns:
      The html code of the hidden part of the field or null if the field is visible.
    • getGenerationHandle

      public Object getGenerationHandle()
      Description copied from class: Input
      Implements the interface Arrangeable
      Specified by:
      getGenerationHandle in interface Arrangeable
      Overrides:
      getGenerationHandle in class Input
      Returns:
      null
    • getHtml

      public org.apache.ecs.Element getHtml(EntitySet es)
      Description copied from class: Input
      Returns the html of the Input element
      Overrides:
      getHtml in class Input
      Parameters:
      es - The EntitySet
      Returns:
      The html of the Input element
    • getControlElement

      protected org.apache.ecs.Element getControlElement()
    • getControlButtons

      protected org.apache.ecs.Element getControlButtons(EntitySet es)
    • getHtmlTable

      protected org.apache.ecs.Element getHtmlTable(EntitySet es, org.apache.ecs.Element label)
    • createColumns

      protected void createColumns(int iCol, int iElementXCol, List v, org.apache.ecs.html.TR[] tr, EntitySet es)
    • getStyle

      protected String getStyle(String style, int iRow, int iVSize, int iElementXCol, boolean ro, boolean enabled)
    • setupAccessKeyTooltipAndValidationOnInput

      protected void setupAccessKeyTooltipAndValidationOnInput(org.apache.ecs.html.Input i, int iCol, int iRow, String sTitle, EntitySet es)
    • setupInput

      protected void setupInput(org.apache.ecs.html.Input i, String style, String sValue, boolean disabled, Object[] obj)
    • publishValue

      protected void publishValue(Object publishedValue)
    • validate

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

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

      protected org.apache.ecs.html.Input getInput(String sName, String sValue)
    • typeString

      protected boolean typeString()
    • isSelected

      protected boolean isSelected(String sCurrentValue, boolean oldSelection, String sName)
    • buildDisplayScript

      public void buildDisplayScript(StringBuilder sb)
      Description copied from class: Input
      Every component can add a script to the StringBuilder, script executed when the component is displayed. The method add the script that controls the focus on the input field.
      Overrides:
      buildDisplayScript in class Input
      Parameters:
      sb - The StringBuilder on which we want to add the script
    • validateConcreteValue

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