Package com.jalios.jcms.uicomponent
Class Button
java.lang.Object
com.jalios.jcms.uicomponent.Button
- Direct Known Subclasses:
ButtonAjax,ButtonModal
Produces the button element html
- Since:
- jcms-10.0.7 / JCMS-9734
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classButton.ButtonBuilder<T extends Button.ButtonBuilder<T>>Generic self-typed builder.static enum -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionButton(Button.ButtonBuilder<?> builder) Core button class rendered as<button>or<a>. -
Method Summary
Modifier and TypeMethodDescriptionAdds CSS classes to this Button.addDataAttribute(DataAttribute attribute) booleanbuild()getCss()getHtml()getIcon()getLabel()getName()getTitle()getUrl()getValue()booleanvoidTranslates the button (If provided programmatically using a provided Button on ButtonTag)
-
Field Details
-
DEFAULT_BUTTON_TYPE
-
-
Constructor Details
-
Button
Core button class rendered as<button>or<a>. Built via a generic self-typed builder to preserve subclass types across fluent calls.
-
-
Method Details
-
getHtml
-
getStartHtml
-
getInnerHtml
-
getEndHtml
-
getCss
-
addCss
Adds CSS classes to this Button.The classes string can contain one or more class names separated by spaces. They will be appended to the existing
cssfield.Example:
button.addCss("btn-primary"); button.addCss("btn-lg rounded shadow");- Parameters:
classes- a space-separated string of CSS classes to add- Returns:
- this
Buttoninstance (for fluent usage)
-
getLabel
-
build
-
getIcon
-
getIconSuffix
-
getIconAlt
-
getButtonType
-
isConfirm
public boolean isConfirm() -
getConfirmText
-
getConfirmAttributes
-
getDataAttribute
-
addDataAttribute
-
getHtmlAttributes
-
getButtonContent
-
getUrl
-
getTitle
-
addUrlAsHref
public boolean addUrlAsHref() -
getName
-
getValue
-
translate
Translates the button (If provided programmatically using a provided Button on ButtonTag)- Parameters:
userLang- the User language
-