public class ListGridAction extends Object implements Cloneable
ListGrid that they
are related to.ListGrid#addRowAction(ListGridAction)},
ListGrid#addToolbarAction(ListGridAction)}| Modifier and Type | Field and Description |
|---|---|
protected String |
actionId |
protected String |
actionTargetEntity |
protected String |
actionUrlOverride |
static String |
ADD |
protected Boolean |
allCapable |
static String |
ASSET_ADD |
protected String |
buttonClass |
protected String |
displayText |
static String |
EDIT |
protected Boolean |
forListGridReadOnly |
static String |
GEN_SKUS |
protected String |
iconClass |
static String |
MANUAL_FETCH |
static String |
MULTI_SELECT |
static String |
REMOVE |
protected Boolean |
requiresNonEmptyGrid |
static String |
SINGLE_SELECT |
protected Boolean |
singleActionOnly |
static String |
TREE_ADD |
static String |
TREE_JUMP_TO_CONTEXT |
static String |
UPDATE |
protected String |
urlPostfix |
static String |
VIEW |
| Constructor and Description |
|---|
ListGridAction(String actionId) |
| Modifier and Type | Method and Description |
|---|---|
ListGridAction |
clone() |
String |
getActionId()
Returns an Id that controllers can use to manipulate this action.
|
String |
getActionTargetEntity()
Returns a fully qualified ceiling entity that this listgrid action targets
|
String |
getActionUrlOverride()
Gets the manual override for the data-actionurl attribute on an action.
|
Boolean |
getAllCapable() |
String |
getButtonClass() |
String |
getDisplayText() |
Boolean |
getForListGridReadOnly() |
String |
getIconClass() |
Boolean |
getRequiresNonEmptyGrid()
If a list grid action should be disabled unless there are one or more rows in the grid, this property should be true
|
Boolean |
getSingleActionOnly() |
String |
getUrlPostfix() |
void |
setActionTargetEntity(String actionTargetEntity)
This is used to specify a target entityType for use in listgrid actions
|
void |
setActionUrlOverride(String actionUrlOverride)
This is a manual override for the data-actionurl attribute for an listgrid action.
|
void |
setAllCapable(Boolean allCapable)
Sets whether or not the given list grid action is capable of acting on rows even when none are selected
|
void |
setButtonClass(String buttonClass)
Main intent is for the button class to be used in a JQuery selector for giving this button a click action.
|
void |
setDisplayText(String displayText) |
void |
setForListGridReadOnly(Boolean forListGridReadOnly) |
void |
setIconClass(String iconClass)
Icon classes are displayed next to the
getDisplayText(). |
void |
setRequiresNonEmptyGrid(Boolean requiresNonEmptyGrid) |
void |
setSingleActionOnly(Boolean singleActionOnly)
Sets where or not this action can only be performed on a single item.
|
void |
setUrlPostfix(String urlPostfix)
This means different things depending on where this action is on the list grid.
|
ListGridAction |
withActionTargetEntity(String actionTargetEntity) |
ListGridAction |
withActionUrlOverride(String actionUrlOverride) |
ListGridAction |
withAllCapable(Boolean allCapable) |
ListGridAction |
withButtonClass(String buttonClass) |
ListGridAction |
withDisplayText(String displayText) |
ListGridAction |
withForListGridReadOnly(Boolean forListGridReadOnly) |
ListGridAction |
withIconClass(String iconClass) |
ListGridAction |
withRequiresNonEmptyGrid(Boolean requiresNonEmptyGrid) |
ListGridAction |
withSingleActionOnly(Boolean singleActionOnly) |
ListGridAction |
withUrlPostfix(String urlPostfix) |
public static final String ADD
public static final String GEN_SKUS
public static final String REMOVE
public static final String UPDATE
public static final String MANUAL_FETCH
public static final String VIEW
public static final String EDIT
public static final String TREE_ADD
public static final String TREE_JUMP_TO_CONTEXT
public static final String SINGLE_SELECT
public static final String MULTI_SELECT
public static final String ASSET_ADD
protected String buttonClass
protected String urlPostfix
protected String iconClass
protected String displayText
protected String actionId
protected Boolean forListGridReadOnly
protected String actionUrlOverride
protected Boolean allCapable
protected Boolean singleActionOnly
protected String actionTargetEntity
protected Boolean requiresNonEmptyGrid
public ListGridAction(String actionId)
public ListGridAction withButtonClass(String buttonClass)
#setButtonClass(String)}public ListGridAction withUrlPostfix(String urlPostfix)
#setUrlPostfix(String)}public ListGridAction withIconClass(String iconClass)
#setIconClass(String)}public ListGridAction withRequiresNonEmptyGrid(Boolean requiresNonEmptyGrid)
#setRequiresNonEmptyGrid(Boolean)}public ListGridAction withDisplayText(String displayText)
#setDisplayText(String)}public ListGridAction withForListGridReadOnly(Boolean forListGridReadOnly)
public ListGridAction withActionUrlOverride(String actionUrlOverride)
#setActionUrlOverride(String)}public ListGridAction withAllCapable(Boolean allCapable)
#setAllCapable(Boolean)}public ListGridAction withSingleActionOnly(Boolean singleActionOnly)
#setSingleActionOnly(Boolean)}public ListGridAction withActionTargetEntity(String actionTargetEntity)
#setActionTargetEntity(String)}public String getButtonClass()
public Boolean getForListGridReadOnly()
public void setButtonClass(String buttonClass)
An example JQuery selector would look like: $('body').on('click', 'button.some-class', function() { doSomeFunction() });
buttonClass - public String getUrlPostfix()
public void setUrlPostfix(String urlPostfix)
ListGrid.getPath() and
presented as a 'data-actionurl' attribute for the buttonurlPostfix - public String getIconClass()
public void setIconClass(String iconClass)
getDisplayText(). These can technically be whatever you like and
you can use css selectors to style them accordingly. That said, Broadleaf uses the FontAwesome set of icons out of
the box, and it is intended that iconClass is an icon from the FontAwesome framework. To see the icons that
are included, check out http://fortawesome.github.com/Font-Awesome/#icons-newiconClass - public String getDisplayText()
public void setDisplayText(String displayText)
public void setForListGridReadOnly(Boolean forListGridReadOnly)
public String getActionUrlOverride()
public void setActionUrlOverride(String actionUrlOverride)
actionUrlOverride - public String getActionId()
public Boolean getAllCapable()
public void setAllCapable(Boolean allCapable)
allCapable - public Boolean getSingleActionOnly()
public void setSingleActionOnly(Boolean singleActionOnly)
singleActionOnly - public String getActionTargetEntity()
public void setActionTargetEntity(String actionTargetEntity)
actionTargetEntity - public Boolean getRequiresNonEmptyGrid()
public void setRequiresNonEmptyGrid(Boolean requiresNonEmptyGrid)
public ListGridAction clone()
Copyright © 2017. All rights reserved.