Class SideNavBuilder
java.lang.Object
io.mindspice.simplypages.builders.SideNavBuilder
Builds a
SideNav with ordered sections and links.
Contract: generated links include HTMX navigation attributes and target
#content-area unless overridden with withContentTarget(String).
Mutability and thread-safety: mutable and not thread-safe. Use per request/setup flow and do not mutate concurrently.
-
Method Summary
Modifier and TypeMethodDescriptionAppends a non-active link without an icon.Appends a link with explicit active state and no icon.Appends a link with explicit active state and icon.Appends a non-active link with an icon and an application-controlled or separately navigation/endpoint-validated path; no Link scheme policy is applied.addSection(String title) Appends a section header entry.build()Builds a newSideNavsnapshot from current entries.static SideNavBuildercreate()Creates a new builder.withContentTarget(String target) Sets the HTMX target used for generated links.
-
Method Details
-
create
Creates a new builder. -
addSection
Appends a section header entry. -
addLink
Appends a non-active link without an icon. Path must be application-controlled or separately validated for navigation and hx-get; no Link scheme policy is applied. -
addLink
Appends a link with explicit active state and no icon. Path must be application-controlled or separately navigation/endpoint-validated; encoding does not enforce destination policy. -
addLink
Appends a non-active link with an icon and an application-controlled or separately navigation/endpoint-validated path; no Link scheme policy is applied. -
addLink
Appends a link with explicit active state and icon. Path is encoded into href and hx-get, not scheme-validated; supply an application-controlled or separately validated destination. -
withContentTarget
Sets the HTMX target used for generated links. -
build
-