Class InputHtml

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

@Component public class InputHtml extends Input
This class implements an input field that, using the quill library, renders also a toolbar that allows the user to apply to the inserted text some complex html formatting.
See Also:
GCApi:
component
  • Field Details

    • _width

      protected int _width
    • _height

      protected int _height
  • Constructor Details

    • InputHtml

      public InputHtml()
  • Method Details

    • setWIDTH

      public void setWIDTH(String s)
      Sets the field's width, expressed in pixel. The default value is 600.
      Parameters:
      s - The field's width
    • setHEIGHT

      public void setHEIGHT(String s)
      Sets the field's height, expressed in pixel. The default value is 300.
      Parameters:
      s - The field's height
    • setup

      protected void setup()
      Description copied from class: Component
      Setup the Component
      Overrides:
      setup in class Input
    • 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
    • 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
    • validate

      protected void validate(org.apache.ecs.html.TextArea ta, EntitySet es, boolean ro)
    • control

      protected void control(org.apache.ecs.html.TextArea ta, EntitySet es)
    • 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 controls the Quill editor substitution and managing
      Overrides:
      buildDisplayScript in class Input
      Parameters:
      sb - The StringBuilder on which we want to add the script
    • getCustomQuillConfig

      protected String getCustomQuillConfig()
      Returns the custom Quill configuration to pass to createQuillEditor. Subclasses can override this to provide custom toolbar configurations.
      Returns:
      JavaScript object literal string with custom config, or null for default