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
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceNested 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) booleanhasAttribute(String attributeName) booleanhasCssClass(String cssClass) default HtmlViewElementremove(ViewElement.WitherRemover... functions) Execute one or more remover functions.removeAttribute(String attributeName) removeCssClass(String... cssClass) default HtmlViewElementset(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, setNameMethods 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:ViewElementExecute one or more setter functions.- Specified by:
setin interfaceMutableViewElement- Specified by:
setin interfaceViewElement- Parameters:
setters- to execute- Returns:
- self
-
remove
Description copied from interface:ViewElementExecute 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:
removein interfaceMutableViewElement- Specified by:
removein interfaceViewElement- Parameters:
functions- to execute- Returns:
- self
-