Font Icons

The cssClassFa() element is used to specify the name of a Font Awesome icon name, to be rendered on the action’s representation as a button or menu item. The related cssClassFaPosition() element specifies the positioning of the icon, to the left or the right of the text.

These attributes can also be applied to domain objects to specify the object’s icon.

For example:

public class ToDoItem {

    @ActionLayout(
        cssClassFa="fa-step-backward"
    )
    public ToDoItem previous() {
        // ...
    }

    @ActionLayout(
        cssClassFa="fa-step-forward",
        cssClassFaPosition=ActionLayout.CssClassFaPosition.RIGHT
    )
    public ToDoItem next() {
        // ...
    }
}

There can be multiple "fa-" classes, eg to mirror or rotate the icon. There is no need to include the mandatory fa "marker" CSS class; it will be automatically added to the list. The fa- prefix can also be omitted from the class names; it will be prepended to each if required.