public final class CmsContentEditor
extends com.alkacon.acacia.client.EditorBase
限定符和类型 | 字段和说明 |
---|---|
protected com.google.gwt.user.client.Command |
m_onClose
The on close call back.
|
protected CmsToolbar |
m_toolbar
The edit tool-bar.
|
限定符和类型 | 方法和说明 |
---|---|
static void |
addEntityChangeListener(I_CmsEntityChangeListener changeListener,
java.lang.String changeScope)
Adds an entity change listener.
|
protected void |
clearEditor() |
void |
closeEditor()
Closes the editor.
|
protected CmsEditorContext |
getContext()
Gets the editor context.
|
protected java.lang.String |
getContextUri() |
protected I_CmsCoreServiceAsync |
getCoreService()
Returns the core RPC service.
|
static com.alkacon.vie.client.Entity |
getEntity()
Returns the currently edited entity.
|
protected java.lang.String |
getEntityId()
Gets the entity id.
|
protected java.lang.String |
getHtmlContextInfo() |
static CmsContentEditor |
getInstance()
Returns the in-line editor instance.
|
I_CmsContentServiceAsync |
getService() |
static boolean |
hasEditable(com.google.gwt.dom.client.Element element)
Returns if the given element or it's descendants are inline editable.
|
static boolean |
isEditable(com.google.gwt.dom.client.Element element)
Checks whether the given element is annotated for inline editing.
|
void |
loadDefinition(java.lang.String entityId,
I_CmsSimpleCallback<CmsContentDefinition> callback)
Loads the content definition for the given entity and executes the callback on success.
|
void |
loadDefinition(java.lang.String entityId,
java.lang.String newLink,
CmsUUID modelFileId,
I_CmsSimpleCallback<CmsContentDefinition> callback)
Loads the content definition for the given entity and executes the callback on success.
|
void |
loadNewDefinition(java.lang.String entityId,
I_CmsSimpleCallback<CmsContentDefinition> callback)
Loads the content definition for the given entity and executes the callback on success.
|
void |
openFormEditor(CmsEditorContext context,
java.lang.String locale,
java.lang.String elementId,
java.lang.String newLink,
CmsUUID modelFileId,
com.google.gwt.user.client.Command onClose)
Opens the content editor dialog.
|
void |
openInlineEditor(CmsEditorContext context,
CmsUUID elementId,
java.lang.String locale,
com.alkacon.acacia.client.I_InlineFormParent panel,
com.google.gwt.user.client.Command onClose)
Renders the in-line editor for the given element.
|
void |
openStandAloneFormEditor(CmsEditorContext context)
Opens the form based editor.
|
void |
registerClonedEntity(java.lang.String sourceEntityId,
java.lang.String targetEntityId)
Registers a deep copy of the source entity with the given target entity id.
|
void |
registerContentDefinition(com.alkacon.acacia.shared.ContentDefinition definition) |
static void |
replaceResourceIds(com.google.gwt.dom.client.Element element,
java.lang.String oldId,
java.lang.String newId)
Replaces the id's within about attributes of the given element and all it's children.
|
void |
saveAndDeleteEntities(java.util.List<com.alkacon.acacia.shared.Entity> entities,
java.util.List<java.lang.String> deletedEntites,
boolean clearOnSuccess,
com.google.gwt.user.client.Command callback)
Saves the given entities.
|
void |
saveAndDeleteEntities(java.util.Set<java.lang.String> entities,
java.util.Set<java.lang.String> deletedEntites,
boolean clearOnSuccess,
com.google.gwt.user.client.Command callback)
Saves the given entities.
|
static boolean |
setEditable(com.google.gwt.dom.client.Element element,
boolean editable)
Sets all annotated child elements editable.
|
void |
setShowEditorHelp(boolean show)
Sets the show editor help flag to the user session.
|
void |
unregistereEntity(java.lang.String entityId)
Removes the given entity from the entity VIE store.
|
addEntityChangeHandler, addOverlayClickHandler, addValidationChangeHandler, destroyForm, getCurrentEntity, getMessageForKey, getValidationHandler, getWidgetService, hasDictionary, initEditOverlay, loadContentDefinition, markForInlineFocus, onRpcError, reinitWidgets, removeEditOverlays, renderEntityForm, renderEntityForm, renderInlineEntity, rerenderForm, saveEntities, saveEntities, saveEntity, saveEntity, saveEntity, setDictionary, shouldFocusOnInlineEdit, updateHtml, updateOverlayPosition
protected com.google.gwt.user.client.Command m_onClose
protected CmsToolbar m_toolbar
public static void addEntityChangeListener(I_CmsEntityChangeListener changeListener, java.lang.String changeScope)
changeListener
- the change listenerchangeScope
- the change scopepublic static com.alkacon.vie.client.Entity getEntity()
public static CmsContentEditor getInstance()
public static boolean hasEditable(com.google.gwt.dom.client.Element element)
element
- the elementtrue
if the element has editable descendantspublic static boolean isEditable(com.google.gwt.dom.client.Element element)
element
- the element to checktrue
if the given element is annotated for inline editingpublic static void replaceResourceIds(com.google.gwt.dom.client.Element element, java.lang.String oldId, java.lang.String newId)
element
- the elementoldId
- the old idnewId
- the new idpublic static boolean setEditable(com.google.gwt.dom.client.Element element, boolean editable)
element
- the elementeditable
- true
to enable editingtrue
if the element had editable elementspublic void closeEditor()
May be used from outside the editor module.
public I_CmsContentServiceAsync getService()
getService
在类中 com.alkacon.acacia.client.EditorBase
EditorBase.getService()
public void loadDefinition(java.lang.String entityId, I_CmsSimpleCallback<CmsContentDefinition> callback)
entityId
- the entity idcallback
- the callbackpublic void loadDefinition(java.lang.String entityId, java.lang.String newLink, CmsUUID modelFileId, I_CmsSimpleCallback<CmsContentDefinition> callback)
entityId
- the entity idnewLink
- the new linkmodelFileId
- the model file idcallback
- the callbackpublic void loadNewDefinition(java.lang.String entityId, I_CmsSimpleCallback<CmsContentDefinition> callback)
entityId
- the entity idcallback
- the callbackpublic void openFormEditor(CmsEditorContext context, java.lang.String locale, java.lang.String elementId, java.lang.String newLink, CmsUUID modelFileId, com.google.gwt.user.client.Command onClose)
context
- the editor contextlocale
- the content localeelementId
- the element idnewLink
- the new linkmodelFileId
- the model file idonClose
- the command executed on dialog closepublic void openInlineEditor(CmsEditorContext context, CmsUUID elementId, java.lang.String locale, com.alkacon.acacia.client.I_InlineFormParent panel, com.google.gwt.user.client.Command onClose)
context
- the editor contextelementId
- the element idlocale
- the content localepanel
- the element panelonClose
- the command to execute on closepublic void openStandAloneFormEditor(CmsEditorContext context)
context
- the editor contextpublic void registerClonedEntity(java.lang.String sourceEntityId, java.lang.String targetEntityId)
sourceEntityId
- the source entity idtargetEntityId
- the target entity idpublic void registerContentDefinition(com.alkacon.acacia.shared.ContentDefinition definition)
registerContentDefinition
在类中 com.alkacon.acacia.client.EditorBase
EditorBase.registerContentDefinition(com.alkacon.acacia.shared.ContentDefinition)
public void saveAndDeleteEntities(java.util.List<com.alkacon.acacia.shared.Entity> entities, java.util.List<java.lang.String> deletedEntites, boolean clearOnSuccess, com.google.gwt.user.client.Command callback)
entities
- the entities to savedeletedEntites
- the deleted entity id'sclearOnSuccess
- true
to clear the VIE instance on successcallback
- the call back commandpublic void saveAndDeleteEntities(java.util.Set<java.lang.String> entities, java.util.Set<java.lang.String> deletedEntites, boolean clearOnSuccess, com.google.gwt.user.client.Command callback)
entities
- the entities to savedeletedEntites
- the deleted entity id'sclearOnSuccess
- true
to clear the VIE instance on successcallback
- the call back commandpublic void setShowEditorHelp(boolean show)
show
- the show editor help flagpublic void unregistereEntity(java.lang.String entityId)
entityId
- the entity idprotected void clearEditor()
clearEditor
在类中 com.alkacon.acacia.client.EditorBase
EditorBase.clearEditor()
protected CmsEditorContext getContext()
protected java.lang.String getContextUri()
getContextUri
在类中 com.alkacon.acacia.client.EditorBase
EditorBase.getContextUri()
protected I_CmsCoreServiceAsync getCoreService()
protected java.lang.String getEntityId()
protected java.lang.String getHtmlContextInfo()
getHtmlContextInfo
在类中 com.alkacon.acacia.client.EditorBase
EditorBase.getHtmlContextInfo()