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 |
actionUrlOverride |
static String |
ADD |
protected Boolean |
allCapable |
protected String |
buttonClass |
protected String |
displayText |
protected Boolean |
forListGridReadOnly |
static String |
GEN_SKUS |
protected String |
iconClass |
static String |
REMOVE |
static String |
REORDER |
protected Boolean |
singleActionOnly |
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 |
getActionUrlOverride()
Gets the manual override for the data-actionurl attribute on an action.
|
Boolean |
getAllCapable() |
String |
getButtonClass() |
String |
getDisplayText() |
Boolean |
getForListGridReadOnly() |
String |
getIconClass() |
Boolean |
getSingleActionOnly() |
String |
getUrlPostfix() |
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 |
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 |
withActionUrlOverride(String actionUrlOverride) |
ListGridAction |
withAllCapable(Boolean allCapable) |
ListGridAction |
withButtonClass(String buttonClass) |
ListGridAction |
withDisplayText(String displayText) |
ListGridAction |
withForListGridReadOnly(Boolean forListGridReadOnly) |
ListGridAction |
withIconClass(String iconClass) |
ListGridAction |
withSingleActionOnly(Boolean singleActionOnly) |
ListGridAction |
withUrlPostfix(String urlPostfix) |
public static final String ADD
public static final String GEN_SKUS
public static final String REORDER
public static final String REMOVE
public static final String UPDATE
public static final String VIEW
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
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 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 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 ListGridAction clone()
Copyright © 2017. All rights reserved.