public abstract class ContentFacetAjaxSaveBehavior<C extends AbstractContent<CA,CF>,CA extends AbstractContentAttribute,CF extends AbstractContentFacet> extends EditorAjaxSaveBehavior
EditorAjaxSaveBehavior
for ContentFacet
type data.Modifier and Type | Field and Description |
---|---|
static String |
PARAM_INDEX
Value of the content Facet as String
|
PARAM_VALUE
Constructor and Description |
---|
ContentFacetAjaxSaveBehavior(String event,
String value,
String uuid,
org.apache.wicket.Component parent,
org.apache.wicket.model.IModel<CF> facetModel)
Create behavior to allow to Save data.
|
ContentFacetAjaxSaveBehavior(String event,
String value,
String uuid,
org.apache.wicket.Component parent,
Object... data) |
Modifier and Type | Method and Description |
---|---|
protected abstract CF |
getContentFacetInstance(C identityObj,
String facetName) |
boolean |
isExistingRecord(Map<String,String[]> data)
The Ajax save works on updating Content using Ids that identify the content record.
|
protected abstract C |
loadContent(Long contentId,
Long facetId)
Load Content only with that facet
|
protected abstract CF |
save(CF cf) |
Object |
save(Map<String,String[]> data)
Save the data on Action
|
eventAction, extract
decorateCallbackUrl, eventFailure, getAjaxCallDecorator, getBody, getCallbackScript, getCallbackUrl, getCallDecorator, getIdMap, getValueMap, isPost, onClick, onEvent, setCallDecorator, setIdMap, setPost, setValueMap
generateCallbackScript, getEvent, getEventHandler, onCheckEvent, onComponentTag, respond, setThrottleDelay
findIndicatorId, getCallbackScript, getChannelName, getFailureScript, getPreconditionScript, getSuccessScript, onBind, onRequest, renderHead, throttleScript
bind, getCallbackUrl, getComponent, getImplementationId, getStatelessHint, onComponentRendered, onComponentTag, onRendered, onRenderHeadContribution, onRenderHeadInitContribution
public static final String PARAM_INDEX
public ContentFacetAjaxSaveBehavior(String event, String value, String uuid, org.apache.wicket.Component parent, org.apache.wicket.model.IModel<CF> facetModel)
event
- as JavaScript event name e.g. onClickvalue
- as String , the value we want to Persist / put part of the Script generateduuid
- as String, a unique id that help ties the request/response in Ajax on the screen to a section on the UIparent
- as Component
contentFacet
- as ContentFacet
contentService
- as associated ContentService
referencepublic boolean isExistingRecord(Map<String,String[]> data)
EditorAjaxSaveBehavior
isExistingRecord
in class EditorAjaxSaveBehavior
data
- as Map
public Object save(Map<String,String[]> data) throws Exception
EditorAjaxSaveBehavior
save
in class EditorAjaxSaveBehavior
data
- as Map
; that comes from the RequestException
protected abstract C loadContent(Long contentId, Long facetId)
contentId
- as LongfacetId
- as LongCopyright © 2018. All rights reserved.