org.broadleafcommerce.openadmin.web.form.component
Class ListGridAction
java.lang.Object
org.broadleafcommerce.openadmin.web.form.component.ListGridAction
public class ListGridAction
- extends Object
Buttons to display on the frontend for a list grid. These will be displayed at the top of the ListGrid that they
are related to.
- Author:
- Andre Azzolini (aazzolini)
- See Also:
ListGrid#addRowAction(ListGridAction)},
ListGrid#addToolbarAction(ListGridAction)}
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
buttonClass
protected String buttonClass
urlPostfix
protected String urlPostfix
iconClass
protected String iconClass
displayText
protected String displayText
ListGridAction
public ListGridAction()
withButtonClass
public ListGridAction withButtonClass(String buttonClass)
- See Also:
#setButtonClass(String)}
withUrlPostfix
public ListGridAction withUrlPostfix(String urlPostfix)
- See Also:
#setUrlPostfix(String)}
withIconClass
public ListGridAction withIconClass(String iconClass)
- See Also:
#setIconClass(String)}
withDisplayText
public ListGridAction withDisplayText(String displayText)
- See Also:
#setDisplayText(String)}
getButtonClass
public String getButtonClass()
setButtonClass
public 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. You could
technically also apply additional styling to this anchor but is not usually recommended.
An example JQuery selector would look like:
$('body').on('click', 'button.some-class', function() {
doSomeFunction()
});
- Parameters:
buttonClass -
getUrlPostfix
public String getUrlPostfix()
setUrlPostfix
public void setUrlPostfix(String urlPostfix)
- This means different things depending on where this action is on the list grid.
- If this is a toolbar action: this postfix will be appended onto the end of
ListGrid.getPath() and
presented as a 'data-actionurl' attribute for the button
- If this is a row action: this postfix will be presented as a 'data-urlpostfix' attribute on the button
- Parameters:
urlPostfix -
getIconClass
public String getIconClass()
setIconClass
public void setIconClass(String iconClass)
- Icon classes are displayed next to the
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-new
- Parameters:
iconClass -
getDisplayText
public String getDisplayText()
setDisplayText
public void setDisplayText(String displayText)
Copyright © 2013. All Rights Reserved.