Class ColumnButton

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:
ColumnButtonCompare, ColumnLink, ColumnMessage, ColumnSubmit

@Component @Configurable @Ignore("TRUNCATE") public class ColumnButton extends Column
This component extends Column and must be used to insert a button inside the column's cell that allows to throw events (the same event for all the rows of the column)
See Also:
GCApi:
component
  • Field Details

    • _anchor

      protected String _anchor
    • _prompt

      protected String _prompt
    • promptEmpty

      protected boolean promptEmpty
    • _msg

      protected String _msg
    • _dbvRowLabel

      protected String _dbvRowLabel
    • textName

      protected String textName
    • _param

      protected String _param
    • _colIdx

      protected int _colIdx
  • Constructor Details

    • ColumnButton

      public ColumnButton()
      Creates a ColumnButton
  • Method Details

    • setMSG

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

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

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

      public void setTEXTNAME(String s)
      Sets the name of another of the columns of the DBView associated with the table that contains the column, whose values will be used as a label positioned inside the cell next to the button in the corresponding row
      Parameters:
      s - The name of a column whose values will be used as labels
    • groupable

      protected boolean groupable()
      Overrides:
      groupable in class Column
    • getHtmlRow

      public org.apache.ecs.Element getHtmlRow(EntitySet es, int row, int pagerow, ArrayList al)
      Description copied from class: Column
      Returns the html element that defines the row
      Overrides:
      getHtmlRow in class Column
      Parameters:
      es - The EntitySet to which the element belongs
      row - The number of the row
      pagerow - The number ofd the page
      al - The list of values of the row
      Returns:
      The html element that defines the row
    • getTD

      public org.apache.ecs.html.TD getTD(EntitySet es, int row, ArrayList al, boolean roll, boolean selected)
      Description copied from class: Column
      Returns the TD cell element
      Overrides:
      getTD in class Column
      Parameters:
      es - The EntitySet to which the element belongs
      row - The number of the row
      al - The list of values of the row
      roll - true if the mouse cursor is positioned over the cell, false otherwise
      selected - true if the row is currently selected, false otherwise
      Returns:
      The TD cell element
    • setupMetaData

      public void setupMetaData(DBView dbv)
      Description copied from class: Column
      Called to init all the field starting form the DBView
      Overrides:
      setupMetaData in class Column
      Parameters:
      dbv - The DBView with all the field used in the init
    • setMsg

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

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

      protected org.apache.ecs.html.Div getLabelDiv(ArrayList al)
    • getDefaultLayoutLabel

      public String getDefaultLayoutLabel()
      Overrides:
      getDefaultLayoutLabel in class Column
    • getLayoutName

      public String getLayoutName()
      Description copied from class: Component
      Returns the layoutName, the name used for layout purpose such the dragging and dropping of the column for repositioning
      Overrides:
      getLayoutName in class Column
      Returns:
      The string that corresponds to the layoutName of the column