Class RowMessage

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

@Component public class RowMessage extends Control
This class implements a component that must be inserted as a child of a TableView. Each RowMessage will create a specific menu item, menu that will appear when the user right-clicks on a row of the table. An event is associated with each RowMessage, triggered when the user clicks on the specific menu line. The menu created by this object, is static (cannot be changed depending on the row and its content) and is managed on client side; for these reasons it is in fact deprecated and we would like to use the Menu
See Also:
GCApi:
component
  • Field Details

    • _msg

      protected String _msg
    • _prompt

      protected String _prompt
    • promptEmpty

      protected boolean promptEmpty
    • _param

      protected String _param
    • _anchor

      protected String _anchor
    • _visible

      protected boolean _visible
  • Constructor Details

    • RowMessage

      public RowMessage()
  • Method Details

    • setMSG

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

      public void setPARAM(String s)
      Sets a parameter that will be passed to the event associated to the RowMessage.
      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 RowMessage
    • setPROMPT

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

      public void setVISIBLE(String s)
      Sets the visibility of the RowMessage
      Parameters:
      s - true if the RowMessage will be visible, false otherwise
    • getVISIBLE

      public boolean getVISIBLE()
      Checks the visibility of the RowMessage
      Returns:
      true if the RowMessage will be visible, false otherwise
    • getHtml

      public org.apache.ecs.Element getHtml(EntitySet es)
      Description copied from class: Component
      Abstract method that must be extended and returns the html code of the Component
      Specified by:
      getHtml in class Component
      Parameters:
      es - The EntitySet to which the element belongs
      Returns:
      The html of the Component
    • setMsg

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

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