Class RichContentModule
java.lang.Object
io.mindspice.simplypages.core.HtmlTag
io.mindspice.simplypages.core.Module
io.mindspice.simplypages.modules.RichContentModule
- All Implemented Interfaces:
Component, Editable<RichContentModule>
Editable module that renders heterogeneous content items (paragraphs, images, links, headers).
Mutability and thread-safety: mutable and not thread-safe. Child component list is mutable and reused directly during rendering; mutate within a request-scoped flow. For reuse, stop mutating and render as a stable structure with per-request slot/context values.
-
Field Summary
Fields inherited from class HtmlTag
attributes, children, id, innerText, innerTextSlot, selfClosing, tagName, trustedHtml -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddParagraph(Paragraph paragraph) applyEdits(Map<String, String> formData) Applies form data to this module instance.protected voidComposes module structure.Builds the main-property edit view for this module.static RichContentModuleReturns editable child handles for nested editing UIs.Returns the configured module id, ornull.setModuleId(String id) Deprecated.Validates form data before mutation.Sets optional title consumed byModule.buildContent()implementations.Methods inherited from class Module
build, getTitle, invalidateContent, rebuildContent, render, render, withClass, withMaxWidth, withMinWidth, withModuleId, withWidthMethods inherited from class HtmlTag
addClass, addStyle, addTrustedStyle, getChildrenStream, getId, hxDelete, hxGet, hxInclude, hxPatch, hxPost, hxPushUrl, hxPut, hxScrollTargetTop, hxSwap, hxTarget, hxTrigger, withAttribute, withChild, withId, withInnerText, withInnerText, withUnsafeHtml
-
Constructor Details
-
RichContentModule
-
-
Method Details
-
create
-
withTitle
Description copied from class:ModuleSets optional title consumed byModule.buildContent()implementations. -
setModuleId
Deprecated.UseModule.withModuleId(String)for fluent configuration. -
getModuleId
Description copied from class:ModuleReturns the configured module id, ornull.- Overrides:
getModuleIdin classModule
-
addParagraph
-
addImage
-
addHeader
-
buildContent
protected void buildContent()Description copied from class:ModuleComposes module structure.Called at most once by
Module.build()unlessModule.rebuildContent()is invoked. Do not rely on this method for per-request mutation.- Specified by:
buildContentin classModule
-
buildEditView
Description copied from interface:EditableBuilds the main-property edit view for this module.- Specified by:
buildEditViewin interfaceEditable<RichContentModule>- Returns:
- component containing form controls
-
validate
Description copied from interface:EditableValidates form data before mutation.- Specified by:
validatein interfaceEditable<RichContentModule>- Parameters:
formData- form field name to value map- Returns:
- validation result; default is success
-
applyEdits
Description copied from interface:EditableApplies form data to this module instance.Side effect: mutates this module. Implementations should rebuild cached/built structure when required by module lifecycle semantics.
- Specified by:
applyEditsin interfaceEditable<RichContentModule>- Parameters:
formData- form field name to value map- Returns:
- this module instance
-
getEditableChildren
Description copied from interface:EditableReturns editable child handles for nested editing UIs.- Specified by:
getEditableChildrenin interfaceEditable<RichContentModule>- Returns:
- editable children in UI/display order; default is empty
-
Module.withModuleId(String)for fluent configuration.