Class SectionImpl
java.lang.Object
com.semanticcms.section.servlet.impl.SectionImpl
Writes sections as HTML.
TODO: Implement with https://www.w3.org/TR/wai-aria-1.1/#aria-label
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
writeAside
(ServletRequest request, AnyPalpableContent<?, ?> content, ElementContext context, Aside aside, PageIndex pageIndex) static void
writeNav
(ServletRequest request, AnyPalpableContent<?, ?> content, ElementContext context, Nav nav, PageIndex pageIndex) static void
writeSection
(ServletRequest request, AnyPalpableContent<?, ?> content, ElementContext context, Section section, PageIndex pageIndex) static void
writeSectioningContent
(ServletRequest request, AnyPalpableContent<?, ?> content, ElementContext context, SectioningContent sectioningContent, IOFunction<AnySectioningContent<?, ?>, NormalText<?, ?, ?, ? extends AnyFlowContent<?, ?>, ?>> htmlElement, PageIndex pageIndex) Writes the given section.static void
writeToc
(ServletRequest request, AnySectioningContent<?, ?> content, ElementContext context, Page page) Writes the table of contents, if needed and not yet written on the page.
-
Method Details
-
writeToc
public static void writeToc(ServletRequest request, AnySectioningContent<?, ?> content, ElementContext context, Page page) throws ExceptionWrites the table of contents, if needed and not yet written on the page. The determination of whether needed on the page is only performed once per page, with the result cached in a request attribute.- Throws:
Exception
-
writeSectioningContent
public static void writeSectioningContent(ServletRequest request, AnyPalpableContent<?, ?> content, ElementContext context, SectioningContent sectioningContent, IOFunction<AnySectioningContent<?, throws IOException, ServletException, SkipPageException?>, NormalText<?, ?, ?, ? extends AnyFlowContent<?, ?>, ?>> htmlElement, PageIndex pageIndex) Writes the given section.- Parameters:
content
-AnyPalpableContent
has bothAnyHeadingContent
andAnySectioningContent
- Throws:
IOException
ServletException
SkipPageException
-
writeAside
public static void writeAside(ServletRequest request, AnyPalpableContent<?, ?> content, ElementContext context, Aside aside, PageIndex pageIndex) throws IOException, ServletException, SkipPageException -
writeSection
public static void writeSection(ServletRequest request, AnyPalpableContent<?, ?> content, ElementContext context, Section section, PageIndex pageIndex) throws IOException, ServletException, SkipPageException
-