Interface DeferredContentSourceModelElement
- All Superinterfaces:
ContentModelElement,ExtensibilityModelElement
This is a ContentModelElement that doesn't place any content at the location where it is placed in
the ExtensibilityModel. Instead it is adds content to a previously rendered DeferredContentTargetModelElement
that it is associated with. This has been provided to allow WebScripts to add new CSS and JavaScript dependency requests
into the <HEAD> element of the HTML page after it has already been rendered.
- Author:
- David Draper
-
Field Summary
Fields inherited from interface org.springframework.extensions.surf.extensibility.ContentModelElement
TYPE -
Method Summary
Modifier and TypeMethodDescriptionvoidenterEditMode(String mode) Indicates the previously generated deferred content is being edited by an extension.voidIndicates that the previously generated deferred content has finished being edited by an extension.booleanIndicates whether or not the element has been removed from the model or not.voidAllow elements to be marked when they're removed.Methods inherited from interface org.springframework.extensions.surf.extensibility.ContentModelElement
flushContent, getNextContentBufferElementMethods inherited from interface org.springframework.extensions.surf.extensibility.ExtensibilityModelElement
getDirectiveName, getId, getType
-
Method Details
-
enterEditMode
Indicates the previously generated deferred content is being edited by an extension. This calls the associated
DeferredContentTargetModelElementto indicate that editing is occurring to prepare it for handling subsequent requests.- Parameters:
mode- The mode of editing being started, e.g. "replace", "remove", "after", etc.
-
exitEditMode
void exitEditMode()Indicates that the previously generated deferred content has finished being edited by an extension.
-
markAsRemoved
void markAsRemoved()Allow elements to be marked when they're removed. This is done because even if an element is removed from the model it may still be referenced elsewhere. This makes it possible to check that the element is still part of the model when the model is not available.
-
hasBeenRemoved
boolean hasBeenRemoved()Indicates whether or not the element has been removed from the model or not.
- Returns:
trueif the element is no longer in the model andfalseotherwise.
-