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 |
static String |
ADD |
protected String |
buttonClass |
protected String |
displayText |
protected Boolean |
forListGridReadOnly |
static String |
GEN_SKUS |
protected String |
iconClass |
static String |
REMOVE |
static String |
REORDER |
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 |
getButtonClass() |
String |
getDisplayText() |
Boolean |
getForListGridReadOnly() |
String |
getIconClass() |
String |
getUrlPostfix() |
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 |
setUrlPostfix(String urlPostfix)
This means different things depending on where this action is on the list grid.
|
ListGridAction |
withButtonClass(String buttonClass) |
ListGridAction |
withDisplayText(String displayText) |
ListGridAction |
withForListGridReadOnly(Boolean forListGridReadOnly) |
ListGridAction |
withIconClass(String iconClass) |
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
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 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 getActionId()
public ListGridAction clone()
Copyright © 2019. All rights reserved.