Class TaskMessage

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

@Component public class TaskMessage extends Control implements Hideable
This class implements the component that defines a single application menu (TaskBar) voice, that can be inserted in one TaskBox. Often the voices links the applicative pages (ie pressing on the voice the corresponding Window will be pushed in the WindowManager stack), but it is possible to associate and fire any event to the pressure, like the window closing, the creation of a report, the starting of a task, etc.
See Also:
GCApi:
component
  • Field Details

    • _destination

      protected String _destination
    • _param

      protected String _param
    • _sessionvisible

      protected String _sessionvisible
    • _visible

      protected SetPredicate _visible
    • _flagvisible

      protected String _flagvisible
    • _lastshow

      protected boolean _lastshow
    • _refreshTime

      protected int _refreshTime
    • _refreshNumber

      protected int _refreshNumber
    • _msg

      protected String _msg
  • Constructor Details

    • TaskMessage

      public TaskMessage()
  • Method Details

    • setLASTSHOW

      public void setLASTSHOW(String s)
      Sets the visibility of the TaskMessage when the Window that contains it is the last one of the stack
      Parameters:
      s - true if the TaskMessage will be visible when the window that contains it is the last one of the stack, false otherwise
    • getLASTSHOW

      public boolean getLASTSHOW()
      Checks if the TaskMessage will be visible when the Window that cotains it is the last one of the stack
      Returns:
      true if the TaskMessage is visible when the window that contains it is the last one of the stack, false otherwise
    • setFLAGVISIBLE

      public void setFLAGVISIBLE(String s)
      Sets the name of a flag used to determine the visibility of the TaskMessage. If the WindowManager of the Window that contains the TaskMessage has a flag (WindowManager.getFlag(java.lang.String)) that corresponds to the one passed as parameter to this function, the TaskMessage will be visible, otherwise it will not
      Parameters:
      s - The name of the flag
    • getFLAGVISIBLE

      public String getFLAGVISIBLE()
      Returns the name of the flag used to determine the visibility of the TaskMessage
      Returns:
      The name of the flag
    • setMSG

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

      public String getMSG()
      Returns the message contained in the alert that will appears when the user clicks the TaskMessage
      Returns:
      The string that represents the message
    • setSESSIONVISIBLE

      public void setSESSIONVISIBLE(String s)
      Sets the name of a key used to determine the visibility of the TaskMessage. If the WebSession contains a key (WebSession.containsKey(java.lang.String)) that corresponds to the one passed as parameter to this function, the TaskMessage will be visible, otherwise it will not
      Parameters:
      s - The name of the key
    • getSESSIONVISIBLE

      public String getSESSIONVISIBLE()
      Returns the name of the session key used to determine the visibility of the TaskMessage
      Returns:
      The name of the key
    • setVISIBLE

      public void setVISIBLE(String s)
      Defines if the TaskMessage should be visible or not
      Specified by:
      setVISIBLE in interface Hideable
      Parameters:
      s - A string that represents a boolean value ("true" or "1", "false" or "0") or a function.
      If the string is not recognized as a boolean value, it is considered as a user function with this meaning: if the user currently logged in the application has the function, the TaskMessage will be rendered, otherwise it will not
    • getVISIBLE

      @Deprecated(since="9.0.0") public boolean getVISIBLE()
      Deprecated.
      Use isVisible() instead
      Specified by:
      getVISIBLE in interface Hideable
      Returns:
      Use isVisible() instead
    • isVisible

      public boolean isVisible()
      Checks if the TaskMessage is rendered for the user currently logged in the application, or not (see getBoolean(visible,id,true), setFLAGVISIBLE(java.lang.String), setLASTSHOW(java.lang.String), and setSESSIONVISIBLE(java.lang.String))
      Specified by:
      isVisible in interface Hideable
      Returns:
      true if the TaskMessage is visible, false otherwise
    • setDESTINATION

      public void setDESTINATION(String s)
      Sets the reference to the Container that will manage the event associated to the TaskMessage
      Parameters:
      s - The registryname of the container that will manage the event
    • getDESTINATION

      public String getDESTINATION()
      Returns the reference to the Container that manages the event associated to the TaskMessage
      Returns:
      The registryname of the container that manages the event
    • setPARAM

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

      public String getPARAM()
      Returns the parameter that will be passed to the event associated to the TaskMessage
      Returns:
      The string that represents the parameter
    • setREFRESHTIME

      public void setREFRESHTIME(String s)
      Sets a refresh time. By setting this attribute it will appear a little progress bar under the label of the TaskMessage, that graphically highlights the passage of time. Once the time has elapsed, the event associated to the TaskMessage will be triggered
      Parameters:
      s - The refresh time, expressed in seconds. The default value is 0 (that means no refresh)
    • setREFRESHNUMBER

      public void setREFRESHNUMBER(String s)
      Sets a refresh number. Defines the number of automatic executions of the event associated to the TaskMessage.
      Parameters:
      s - The refresh number, the default value is 10
    • getRefreshTime

      public int getRefreshTime()
      Returns the refresh time
      Returns:
      The integer that represents the refresh time, expressed in seconds. The default value is 0, that means no refresh.
    • getRefreshNumber

      public int getRefreshNumber()
      Returns the refresh number
      Returns:
      The integer that represents the refresh number. The default value is 10
    • 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
    • draw

      @Deprecated(since="11.0", forRemoval=true) public static org.apache.ecs.Element draw(EntitySet es, Window wnd, boolean ro, boolean enabled, String destination, String name, String param, Icon icon, String shortcut, String keylabel, boolean selected, String msg, int refreshTime, int refreshNumber, int refreshed)
      Parameters:
      es - The EntitySet
      wnd - the Window
      ro - Defines if the element is in read only state
      enabled - Defines if the element is enabled
      destination - The registryname of the container that will manage the event
      name - The name of the element
      param - A string that represents the parameter passed to the event triggered element
      icon - The Icon that will appear on the left of the menu voice
      shortcut - The shortcut key for the label
      keylabel - The label
      selected - Defines if the element is currently selected
      msg - A string that represents the message contained in the alert that will appears when the user clicks the element
      refreshTime - The refresh (automatic execution) time
      refreshNumber - The maximum refresh (automatic execution) number
      refreshed - The number of refreshes (automatic executions) executed
      Returns:
      the Element with its drawing logic
    • draw

      @Deprecated(since="11.0", forRemoval=true) public static org.apache.ecs.Element draw(EntitySet es, Window wnd, boolean ro, boolean enabled, String destination, String name, String param, Icon icon, String shortcut, String keylabel, boolean selected, String msg, int refreshTime, int refreshNumber, int refreshed, boolean accessibleMode, int tabindex)
      Draw an Element with its drawing logic
      Parameters:
      es - The EntitySet
      wnd - the Window
      ro - Defines if the element is in read only state
      enabled - Defines if the element is enabled
      destination - The registryname of the container that will manage the event
      name - The name of the element
      param - A string that represents the parameter passed to the event triggered element
      icon - The Icon that will appear on the left of the menu voice
      shortcut - The shortcut key for the label
      keylabel - The label
      selected - Defines if the element is currently selected
      msg - A string that represents the message contained in the alert that will appears when the user clicks the element
      refreshTime - The refresh (automatic execution) time
      refreshNumber - The maximum refresh (automatic execution) number
      refreshed - The number of refreshes (automatic executions) executed
      accessibleMode - Define if the application's mode is the accessible one or not
      tabindex - Define the tab index
      Returns:
      the Element with its drawing logic
    • draw

      @Deprecated(since="11.0.2") public static org.apache.ecs.Element draw(EntitySet es, Window wnd, boolean ro, boolean enabled, String destination, String name, String param, Icon icon, String shortcut, String keylabel, boolean selected, String msg, int refreshTime, int refreshNumber, int refreshed, boolean accessibleMode, int tabindex, String tooltip, boolean isParentNode)
      Draw an Element with its drawing logic
      Parameters:
      es - The EntitySet
      wnd - the Window
      ro - Defines if the element is in read only state
      enabled - Defines if the element is enabled
      destination - The registryname of the container that will manage the event
      name - The name of the element
      param - A string that represents the parameter passed to the event triggered element
      icon - The Icon that will appear on the left of the menu voice
      shortcut - The shortcut key for the label
      keylabel - The label
      selected - Defines if the element is currently selected
      msg - A string that represents the message contained in the alert that will appears when the user clicks the element
      refreshTime - The refresh (automatic execution) time
      refreshNumber - The maximum refresh (automatic execution) number
      refreshed - The number of refreshes (automatic executions) executed
      accessibleMode - Define if the application's mode is the accessible one or not
      tabindex - Define the tab index
      tooltip - Tooltip to add on the element.
      isParentNode - Define wheter the node is a parent or not. If the node is a parent ones it must present an arrow on the right.
      Returns:
      the Element with its drawing logic
    • draw

      public static org.apache.ecs.Element draw(EntitySet es, Window wnd, boolean ro, boolean enabled, String destination, String name, String param, Icon icon, String shortcut, String keylabel, boolean selected, String msg, int refreshTime, int refreshNumber, int refreshed, boolean accessibleMode, int tabindex, String tooltip, boolean isParentNode, boolean hasActiveModule, String moduleTooltip)
      Draw an Element with its drawing logic
      Parameters:
      es - The EntitySet
      wnd - the Window
      ro - Defines if the element is in read only state
      enabled - Defines if the element is enabled
      destination - The registryname of the container that will manage the event
      name - The name of the element
      param - A string that represents the parameter passed to the event triggered element
      icon - The Icon that will appear on the left of the menu voice
      shortcut - The shortcut key for the label
      keylabel - The label
      selected - Defines if the element is currently selected
      msg - A string that represents the message contained in the alert that will appears when the user clicks the element
      refreshTime - The refresh (automatic execution) time
      refreshNumber - The maximum refresh (automatic execution) number
      refreshed - The number of refreshes (automatic executions) executed
      accessibleMode - Define if the application's mode is the accessible one or not
      tabindex - Define the tab index
      tooltip - Tooltip to add on the element.
      isParentNode - Define wheter the node is a parent or not. If the node is a parent ones it must present an arrow on the right.
      hasActiveModule - Define wheter the node has a licensed module or not.
      moduleTooltip - Define the tooltip to visualize.
      Returns:
      the Element with its drawing logic
    • draw

      public static org.apache.ecs.Element draw(EntitySet es, Window wnd, boolean ro, boolean enabled, String destination, String name, String param, Icon icon, String shortcut, String keylabel, boolean selected, String msg, int refreshTime, int refreshNumber, int refreshed, boolean accessibleMode, int tabindex, String tooltip, boolean isParentNode, boolean hasActiveModule, String moduleTooltip, boolean hasSelectedLeafChild)
      Draw an Element with its drawing logic
      Parameters:
      es - The EntitySet
      wnd - the Window
      ro - Defines if the element is in read only state
      enabled - Defines if the element is enabled
      destination - The registryname of the container that will manage the event
      name - The name of the element
      param - A string that represents the parameter passed to the event triggered element
      icon - The Icon that will appear on the left of the menu voice
      shortcut - The shortcut key for the label
      keylabel - The label
      selected - Defines if the element is currently selected
      msg - A string that represents the message contained in the alert that will appears when the user clicks the element
      refreshTime - The refresh (automatic execution) time
      refreshNumber - The maximum refresh (automatic execution) number
      refreshed - The number of refreshes (automatic executions) executed
      accessibleMode - Define if the application's mode is the accessible one or not
      tabindex - Define the tab index
      tooltip - Tooltip to add on the element.
      isParentNode - Define wheter the node is a parent or not. If the node is a parent ones it must present an arrow on the right.
      hasActiveModule - Define wheter the node has a licensed module or not.
      moduleTooltip - Define the tooltip to visualize.
      hasSelectedLeafChild - Define whether this parent node has a selected leaf child (in menuDrillLeaf mode).
      Returns:
      the Element with its drawing logic
    • setMsg

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