Class JFCMessage

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:
ChartMessage

@Component public class JFCMessage extends Control implements Hideable
The class extends Control and implements a special kind of button, that can be inserted as a child in the XML definition of a chart (a JFCPie or a JFCSerie) to obtain an active element with an (optional) icon and a (optional) label, that the user can click to throw the associated event. The JFCMessages will appear at the top of the chart element.
See Also:
GCApi:
component
  • Field Details

    • _visible

      protected SetPredicate _visible
    • _param

      protected String _param
    • _msg

      protected String _msg
    • _prompt

      protected String _prompt
    • promptEmpty

      protected boolean promptEmpty
    • _anchor

      protected String _anchor
  • Constructor Details

    • JFCMessage

      public JFCMessage()
  • Method Details

    • setMSG

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

      public String getMSG()
      Returns the string used as message for the event associated to the element
      Returns:
      The string used as message for the event
    • setPROMPT

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

      public void setVISIBLE(String s)
      Description copied from interface: Hideable
      Sets the visibility of the component
      Specified by:
      setVISIBLE in interface Hideable
      Parameters:
      s - String used to defines the visibility of the component
    • isVisible

      public boolean isVisible()
      Description copied from interface: Hideable
      Checks the visibility of the component
      Specified by:
      isVisible in interface Hideable
      Returns:
      true if the component is visible, false otherwise
    • setPARAM

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

      public String getPARAM()
      Returns the string used as parameter for the event associated to the element
      Returns:
      The string used as parameter for the event
    • 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 element.
      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 element
    • setPrompt

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