Class TableMessage

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

@Component public class TableMessage extends Control implements Hideable
The class extends Control and implements a button that appears in the top right corner of the TableView, ServerTableView or CardView.
This user interface elements allows to throw events and can have a label and an icon.
Since it is positioned at the table level, this button should be used for launching events that have something to do with the table or its rows (for example the adding of a new record).
See Also:
GCApi:
component
  • Field Details

    • _param

      protected String _param
    • _visible

      protected SetPredicate _visible
    • _msg

      protected String _msg
    • _prompt

      protected String _prompt
    • promptEmpty

      protected boolean promptEmpty
    • _anchor

      protected String _anchor
  • Constructor Details

    • TableMessage

      public TableMessage()
  • Method Details

    • setMSG

      public void setMSG(String s)
      Sets the string that appears as a message for the event associated to the TableMessage.
      If there is a message, when the user clicks the TableMessage 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 TableMessage
    • setPROMPT

      public void setPROMPT(String s)
      Sets the string that appears as a prompt message for the event associated to the TableMessage.
      If there is a prompt, when the user clicks the TableMessage 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 TableMessage
    • 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 button. 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
    • getMSG

      public String getMSG()
      Returns the message (see setMSG(java.lang.String))
      Returns:
      The string that represents the message
    • setVISIBLE

      public void setVISIBLE(String s)
      Sets the visibility of the TableMessage
      Specified by:
      setVISIBLE in interface Hideable
      Parameters:
      s - true if the TableMessage will be visible, false otherwise, or a name of a function used to determine visibility (see isVisible())
    • getVISIBLE

      @Deprecated(since="12.0", forRemoval=true) public boolean getVISIBLE()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getVISIBLE in interface Hideable
      Returns:
      Use Hideable.isVisible()
    • isVisible

      public boolean isVisible()
      Checks the visibility of the TableMessage.
      See Component.getBoolean(String s,boolean def)
      Specified by:
      isVisible in interface Hideable
      Returns:
      true is visible, false otherwise
    • setPARAM

      public void setPARAM(String s)
      Sets a parameter that will be passed to the event associated to the TableMessage.
      If there is a param, when the event is triggered it will receive 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 triggered by the TableMessage
    • getPARAM

      public String getPARAM()
      Returns the param (see setPARAM(java.lang.String))
      Returns:
      The string that represents the param
    • getHtml

      public org.apache.ecs.Element getHtml(EntitySet es)
      Returns the html code of the TableMessage
      Specified by:
      getHtml in class Component
      Parameters:
      es - The EntitySet to which the element belongs
      Returns:
      The html code of the TableMessage
    • setMsg

      public void setMsg(String s)
      Sets programmatically the string that appears as a message for the event associated to the TableMessage.
      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 TableMessage
    • setPrompt

      public void setPrompt(String s)
      Sets programmatically the string that appears as a prompt message for the event associated to the TableMessage.
      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 TableMessage