Class TemplateViewElement
java.lang.Object
com.foreach.across.modules.web.ui.ViewElementSupport
com.foreach.across.modules.web.ui.elements.TemplateViewElement
- All Implemented Interfaces:
MutableViewElement,ViewElement
A
ViewElement that simply renders as a custom template.
If no ViewElementSupport.getCustomTemplate() is defined, this element will output nothing.- Author:
- Arne Vandamme
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.foreach.across.modules.web.ui.MutableViewElement
MutableViewElement.FunctionsNested 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> -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTemplateViewElement(String customTemplate) TemplateViewElement(String name, String customTemplate) -
Method Summary
Modifier and TypeMethodDescriptionaddAttributes(Map<String, Object> attributes) getAttribute(String attributeName) <V> VgetAttribute(String attributeName, Class<V> expectedType) booleanhasAttribute(String attributeName) remove(ViewElement.WitherRemover... functions) Execute one or more remover functions.removeAttribute(String attributeName) protected <V> VreturnIfType(Object value, Class<V> elementType) set(ViewElement.WitherSetter... setters) Execute one or more setter functions.setAttribute(String attributeName, Object attributeValue) setAttributes(@NonNull Map<String, Object> attributes) setElementType(String elementType) Methods inherited from class com.foreach.across.modules.web.ui.ViewElementSupport
getCustomTemplate, getElementType, getName, setCustomTemplate, setNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.foreach.across.modules.web.ui.ViewElement
get, matches
-
Field Details
-
ELEMENT_TYPE
- See Also:
-
-
Constructor Details
-
TemplateViewElement
-
TemplateViewElement
-
TemplateViewElement
public TemplateViewElement()
-
-
Method Details
-
setElementType
- Overrides:
setElementTypein classViewElementSupport
-
getAttributes
-
setAttributes
-
setAttribute
-
addAttributes
-
removeAttribute
-
getAttribute
-
getAttribute
-
hasAttribute
-
returnIfType
-
set
Description copied from interface:ViewElementExecute one or more setter functions.- Specified by:
setin interfaceMutableViewElement- Specified by:
setin interfaceViewElement- Overrides:
setin classViewElementSupport- 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- Overrides:
removein classViewElementSupport- Parameters:
functions- to execute- Returns:
- self
-