public abstract class ProductMetaItemAjaxSaveBehavior<P extends Product> extends EditorAjaxSaveBehavior implements IAdminPanel
PARAM_VALUE
Constructor and Description |
---|
ProductMetaItemAjaxSaveBehavior(String event,
String value,
String uuid,
org.apache.wicket.Component parent,
Map<String,String[]> paramMap,
Long existingRecId,
String metaName,
boolean isFacetMetaType)
Create behavior to allow to Save data.
|
ProductMetaItemAjaxSaveBehavior(String event,
String value,
String uuid,
org.apache.wicket.Component parent,
Map<String,String[]> paramMap,
Object... data) |
Modifier and Type | Method and Description |
---|---|
boolean |
isExistingRecord(Map<String,String[]> data)
The Ajax save works on updating Content using Ids that identify the content record.
|
protected abstract P |
loadProduct(Long productId) |
Object |
save(Map<String,String[]> data)
Save the data on Action
|
protected abstract P |
save(P p) |
protected abstract ProductAttribute |
save(ProductAttribute pa) |
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 ProductMetaItemAjaxSaveBehavior(String event, String value, String uuid, org.apache.wicket.Component parent, Map<String,String[]> paramMap, Long existingRecId, String metaName, boolean isFacetMetaType)
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
metaItem
- as MetaItem
containing the details of the attribute/field that needs to be persistedproductService
- as associated ProductService
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 ProductAttribute save(ProductAttribute pa)
Copyright © 2018. All rights reserved.