Class ViewElementBuilderSupport<T extends MutableViewElement,SELF extends ViewElementBuilder<T>> 
java.lang.Object
com.foreach.across.modules.web.ui.ViewElementBuilderSupport<T,SELF> 
- Type Parameters:
 T- resultingViewElementSELF- return type for builder methods
- All Implemented Interfaces:
 ViewElementBuilder<T>
- Direct Known Subclasses:
 AbstractVoidNodeViewElementBuilder,ContainerViewElementBuilderSupport,TextViewElementBuilder,ViewElementGeneratorBuilder
public abstract class ViewElementBuilderSupport<T extends MutableViewElement,SELF extends ViewElementBuilder<T>> 
extends Object
implements ViewElementBuilder<T>
Base class for a 
ViewElementBuilder of a MutableViewElement.  Provides defaults functionality
 like configuring a custom templates or a set of post processors.- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classEncapsulates either aViewElementorViewElementBuilderfor fetching within aViewElementBuilderContext.Nested classes/interfaces inherited from interface com.foreach.across.modules.web.ui.ViewElementBuilder
ViewElementBuilder.Wither<T extends ViewElementBuilder> - 
Field Summary
Fields - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionprotected Tapply(T viewElement, ViewElementBuilderContext builderContext) final Tbuild(ViewElementBuilderContext builderContext) Builds the element using a specificViewElementBuilderContext.Execute a consumer that applies some configuration to this builder.protected abstract TcreateElement(ViewElementBuilderContext builderContext) customTemplate(String template) elementSupplier(Function<ViewElementBuilderContext, ? extends T> supplierFunction) Set a separate supplier which supplies the initial element to which this builder should be applied.elementSupplier(Supplier<? extends T> supplier) Set a separate supplier which supplies the initial element to which this builder should be applied.protected final TpostProcess(ViewElementBuilderContext builderContext, T viewElement) postProcessor(ViewElementPostProcessor<T> postProcessor) protected voidregisterWebResources(WebResourceRegistry webResourceRegistry) Method to implement if web resources should be registered.with(ViewElement.WitherSetter... setters) Apply a collection of setters to the element.Methods 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.ViewElementBuilder
andThen, build, doWith, map, map, postProcess, postProcess 
- 
Field Details
- 
name
 - 
customTemplate
 
 - 
 - 
Constructor Details
- 
ViewElementBuilderSupport
public ViewElementBuilderSupport() 
 - 
 - 
Method Details
- 
elementSupplier
Set a separate supplier which supplies the initial element to which this builder should be applied.- Parameters:
 supplier- to use instead of callingcreateElement(ViewElementBuilderContext)- Returns:
 - current builder
 
 - 
elementSupplier
Set a separate supplier which supplies the initial element to which this builder should be applied.- Parameters:
 supplierFunction- to use instead of callingcreateElement(ViewElementBuilderContext)- Returns:
 - current builder
 
 - 
with
Apply a collection of setters to the element. - 
name
 - 
customTemplate
 - 
configure
Execute a consumer that applies some configuration to this builder. Useful if you do not want to break a fluent api style of coding. The consumer is called immediately if it is notnull. - 
postProcessor
 - 
build
Builds the element using a specificViewElementBuilderContext.- Specified by:
 buildin interfaceViewElementBuilder<T extends MutableViewElement>- Parameters:
 builderContext- provides the context for this build event- Returns:
 - element created and post processed
 
 - 
createElement
 - 
registerWebResources
Method to implement if web resources should be registered. Will only be called if there is aWebResourceRegistrypresent in the current (thread local) context.- Parameters:
 webResourceRegistry- to add entries to
 - 
apply
 - 
postProcess
 
 -