Class ToolbarButton

  • All Implemented Interfaces:
    com.googlecode.wicket.jquery.core.IJsonFactory, Serializable, org.apache.wicket.util.io.IClusterable
    Direct Known Subclasses:
    SecuredToolbarButton

    public class ToolbarButton
    extends AbstractButton
    Provides a toolbar button object that can be used in DataTable toolbar
    Author:
    Sebastien Briquet - sebfz1
    See Also:
    Serialized Form
    • Constructor Detail

      • ToolbarButton

        public ToolbarButton​(String name)
        Constructor for built-in commands
        Parameters:
        name - the button's name
      • ToolbarButton

        public ToolbarButton​(String name,
                             org.apache.wicket.model.IModel<String> text)
        Constructor for built-in commands
        Parameters:
        name - the button's name
        text - the button's text
      • ToolbarButton

        public ToolbarButton​(String name,
                             String property)
        Constructor
        Parameters:
        name - the button's name
        property - the property used to retrieve the row's object value
      • ToolbarButton

        public ToolbarButton​(String name,
                             org.apache.wicket.model.IModel<String> text,
                             String property)
        Constructor
        Parameters:
        name - the button's name
        text - the button's text
        property - the property used to retrieve the row's object value
    • Method Detail

      • isBuiltIn

        public boolean isBuiltIn()
        Description copied from class: AbstractButton
        Indicates whether the button acts as a built-in one (like create, edit, update, destroy)
        Specified by:
        isBuiltIn in class AbstractButton
        Returns:
        true if the button is a built-in one
      • toJSONObject

        public com.github.openjson.JSONObject toJSONObject()
      • onClick

        public void onClick​(org.apache.wicket.ajax.AjaxRequestTarget target,
                            List<String> values)
        Triggered when the toolbar-button is clicked
        Parameters:
        target - the AjaxRequestTarget
        values - the rows object value