public interface CustomTemplateRenderAdapter<T,MODEL,COMPONENT,CONTAINER_COMPONENT> extends Serializable
Modifier and Type | Interface and Description |
---|---|
static class |
CustomTemplateRenderAdapter.Nothing
A way to indicate that the returned value has no significance and should not be used.
|
Modifier and Type | Field and Description |
---|---|
static CustomTemplateRenderAdapter.Nothing |
nothing |
Modifier and Type | Method and Description |
---|---|
COMPONENT |
getComponentForType(MetaItem metaItem,
String fieldComponentName,
MODEL model,
CONTAINER_COMPONENT container,
T modelObject,
User user) |
String |
getItemRefId(MetaItem metaItem)
When rendering Items, for Feedback we may want to target
messages to sections in the form.
|
Object |
processItem(T entity,
MetaItem metaItem,
COMPONENT coreEntityDataField,
User user,
Object... contextParams)
For each meta item handle processing on submit and derive the value to be submitted/persisted back
|
void |
reset()
During Ajax calls a Render Adapter maybe called multiple times.
|
static final CustomTemplateRenderAdapter.Nothing nothing
COMPONENT getComponentForType(MetaItem metaItem, String fieldComponentName, MODEL model, CONTAINER_COMPONENT container, T modelObject, User user)
metaItem
- as MetaItem
fieldComponentName
- as the rendering fieldComponentName or Id (of the component to be created)model
- as MODEL of the value extracted from the original modelObject for the MetaItem
.
This is a variable that would typically be extracted from the modeObject using the MetaItem,
however there is complex logic that can vary and hence is expected to be provided to this method.container
- as CONTAINER_COMPONENT containing the produced componentmodelObject
- as the core domain Object
/Entityuser
- as com.neurosys.security.auth.domain.User for any Authorization related needs @nullable trueProductDetailsTemplatePanel#getComponentForType(MetaItem, String, MODEL, CONTAINER_COMPONENT, com.neurosys.products.domain.Product)
Object processItem(T entity, MetaItem metaItem, COMPONENT coreEntityDataField, User user, Object... contextParams) throws Exception
T
- as entitymeta
- as MetaItem *Component
- representing the entity form fieldUser
- contectParams
- as Object[]; for example a resourceLocationMap as MapCustomTemplateRenderAdapter.Nothing
(nothing). Nothing should not be persisted or used, it implies it should be ignored.Exception
String getItemRefId(MetaItem metaItem)
MetaItem
metaItem
- as MetaItem
void reset()
Copyright © 2018. All rights reserved.