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, extractdecorateCallbackUrl, eventFailure, getAjaxCallDecorator, getBody, getCallbackScript, getCallbackUrl, getCallDecorator, getIdMap, getValueMap, isPost, onClick, onEvent, setCallDecorator, setIdMap, setPost, setValueMapgenerateCallbackScript, getEvent, getEventHandler, onCheckEvent, onComponentTag, respond, setThrottleDelayfindIndicatorId, getCallbackScript, getChannelName, getFailureScript, getPreconditionScript, getSuccessScript, onBind, onRequest, renderHead, throttleScriptbind, getCallbackUrl, getComponent, getImplementationId, getStatelessHint, onComponentRendered, onComponentTag, onRendered, onRenderHeadContribution, onRenderHeadInitContributionpublic 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 ComponentcontentFacet - as ContentFacetcontentService - as associated ContentService referencepublic boolean isExistingRecord(Map<String,String[]> data)
EditorAjaxSaveBehaviorisExistingRecord in class EditorAjaxSaveBehaviordata - as Mappublic Object save(Map<String,String[]> data) throws Exception
EditorAjaxSaveBehaviorsave in class EditorAjaxSaveBehaviordata - as Map; that comes from the RequestExceptionprotected abstract C loadContent(Long contentId, Long facetId)
contentId - as LongfacetId - as LongCopyright © 2018. All rights reserved.