public class ContentEditorPanel extends AdminPanel implements ContentFacetEditor
CkEditorWrapper
with default behaviors, error handling + markup ready made for common use casesadminConfiguration, authorizationModule
Constructor and Description |
---|
ContentEditorPanel(String id,
org.apache.wicket.model.IModel<String> contentModel,
String editorId,
FacetMeta facetMeta,
Object modelObject) |
ContentEditorPanel(String id,
org.apache.wicket.model.IModel<String> contentModel,
String editorId,
Object modelObject) |
Modifier and Type | Method and Description |
---|---|
void |
configureEditor(FacetMeta fm)
Get the CSS(s) & related attribs from the Template#FacetMeta.attributes and configure the Editor to display as per template settings
|
static String |
decorateScriptToUpdateModel(String proxyActionSuppliedScript,
CharSequence script)
Because of CkEditor we have to ensure that on Save/Update from the containing markup/page, the model is updated.
|
protected org.apache.wicket.markup.html.WebMarkupContainer |
defineEditor(String id,
org.apache.wicket.model.IModel<String> contentModel,
String editorId,
FacetMeta facetMeta,
Object modelObject)
Define an editor for Content Editing.
|
protected FieldAjaxEventBehavior |
getAjaxSavingBehavior(org.apache.wicket.ajax.markup.html.AjaxLink link,
org.apache.wicket.ajax.IAjaxCallDecorator callDecorator)
If not null will override the save behavior of the content.
|
String |
getEditorModelValue()
Interface implementation to standardize how to extract the value within the core editor.
|
protected org.apache.wicket.markup.html.WebMarkupContainer |
getExtraButtonsContainer(String componentId,
org.apache.wicket.markup.html.WebMarkupContainer parent) |
getConfigProperty, getModuleForPage, headerMeta, renderHead
onComponentTag, onComponentTagBody, renderHead
newHeaderPartContainer, renderHeadFromAssociatedMarkupFile
getMarkupType, getWebPage, getWebRequest
add, addOrReplace, autoAdd, autoAdd, contains, findMarkupStream, get, get, getAssociatedMarkupStream, getMarkupStream, hasAssociatedMarkup, internalAdd, isTransparentResolver, iterator, iterator, newMarkupResourceStream, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderComponentTagBody, renderNext, replace, setDefaultModel, setMarkupStream, size, swap, toString, toString, visitChildren, visitChildren
add, addStateChange, afterRender, beforeRender, callOnBeforeRenderIfNotVisible, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, configure, continueToOriginalDestination, debug, detach, detachBehaviors, detachModel, detachModels, determineVisibility, error, exceptionMessage, fatal, findPage, findParent, findParentWithAssociatedMarkup, getApplication, getBehaviors, getBehaviors, getBehaviorsRawList, getClassRelativePath, getComponentBorder, getConverter, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessage, getFlag, getFlag, getId, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdImpl, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getResponse, getSession, getSizeInBytes, getStatelessHint, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalAttach, internalDetach, internalOnAttach, internalOnDetach, internalOnModelChanged, isActionAuthorized, isAncestorOf, isAttached, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, locateMarkupStream, markAttached, markRendering, modelChanged, modelChanging, onAfterRender, onAttach, onBeforeRender, onBeginRequest, onConfigure, onDetach, onEndRequest, onInitialize, onModelChanged, onModelChanging, onRemove, prepareForRender, prepareForRender, redirectToInterceptPage, remove, remove, render, render, renderComponent, renderComponent, renderComponentTag, rendered, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, setAuto, setComponentBorder, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setFlag, setIgnoreAttributeModifier, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setRedirect, setRenderBodyOnly, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, urlFor, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, warn, wrap
public ContentEditorPanel(String id, org.apache.wicket.model.IModel<String> contentModel, String editorId, FacetMeta facetMeta, Object modelObject)
public static String decorateScriptToUpdateModel(String proxyActionSuppliedScript, CharSequence script)
IAjaxCallDecorator
s to decorate the scriptprotected org.apache.wicket.markup.html.WebMarkupContainer defineEditor(String id, org.apache.wicket.model.IModel<String> contentModel, String editorId, FacetMeta facetMeta, Object modelObject)
id
- as Component IdcontentModel
- as IModel
of String typeeditorId
- as StringfacetMeta
- as FacetMeta
.CkEditorWrapper
CkEditorWrapper.addCustomControls
,
- Can be String, List or Transformer that returns a List or a String.
public String getEditorModelValue()
getEditorModelValue
in interface ContentFacetEditor
protected org.apache.wicket.markup.html.WebMarkupContainer getExtraButtonsContainer(String componentId, org.apache.wicket.markup.html.WebMarkupContainer parent)
protected FieldAjaxEventBehavior getAjaxSavingBehavior(org.apache.wicket.ajax.markup.html.AjaxLink link, org.apache.wicket.ajax.IAjaxCallDecorator callDecorator)
callDecorator
- as IAjaxCallDecorator ; scripting and wiring with the feeback panel that is apart of this panelFieldAjaxEventBehavior
@nullable trueCopyright © 2018. All rights reserved.