Interface HtmlViewElement
- All Superinterfaces:
MutableViewElement
,ViewElement
- All Known Implementing Classes:
AbstractNodeViewElement
,AbstractTextNodeViewElement
,AbstractVoidNodeViewElement
,NodeViewElement
,VoidNodeViewElement
Adds base properties for a HTML node, like css class and html id support.
- Author:
- Arne Vandamme
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Nested interface which contains wither functions specific for HTML view elements.Nested classes/interfaces inherited from interface com.foreach.across.modules.web.ui.ViewElement
ViewElement.Wither<T extends ViewElement>, ViewElement.WitherGetter<T extends ViewElement,
U>, ViewElement.WitherRemover<T extends ViewElement>, ViewElement.WitherSetter<T extends ViewElement> -
Method Summary
Modifier and TypeMethodDescriptionaddAttributes
(Map<String, Object> attributes) addCssClass
(String... cssClass) getAttribute
(String attributeName) <V,
U extends V>
UgetAttribute
(String attributeName, Class<V> expectedType) boolean
hasAttribute
(String attributeName) boolean
hasCssClass
(String cssClass) default HtmlViewElement
remove
(ViewElement.WitherRemover... functions) Execute one or more remover functions.removeAttribute
(String attributeName) removeCssClass
(String... cssClass) default HtmlViewElement
set
(ViewElement.WitherSetter... setters) Execute one or more setter functions.setAttribute
(String attributeName, Object attributeValue) setAttributes
(Map<String, Object> attributes) Methods inherited from interface com.foreach.across.modules.web.ui.MutableViewElement
setCustomTemplate, setName
Methods inherited from interface com.foreach.across.modules.web.ui.ViewElement
get, getCustomTemplate, getElementType, getName, matches
-
Method Details
-
getTagName
String getTagName() -
addCssClass
-
hasCssClass
-
removeCssClass
-
setHtmlId
-
getHtmlId
String getHtmlId() -
getAttributes
-
setAttributes
-
setAttribute
-
addAttributes
-
removeAttribute
-
getAttribute
-
getAttribute
-
hasAttribute
-
set
Description copied from interface:ViewElement
Execute one or more setter functions.- Specified by:
set
in interfaceMutableViewElement
- Specified by:
set
in interfaceViewElement
- Parameters:
setters
- to execute- Returns:
- self
-
remove
Description copied from interface:ViewElement
Execute one or more remover functions. A remover is defined as a separate interface so implementations can both implement setter and remover at the same time.- Specified by:
remove
in interfaceMutableViewElement
- Specified by:
remove
in interfaceViewElement
- Parameters:
functions
- to execute- Returns:
- self
-