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 voidwriteAside(ServletRequest request, AnyPalpableContent<?, ?> content, ElementContext context, Aside aside, PageIndex pageIndex) Writes the given aside.static voidwriteNav(ServletRequest request, AnyPalpableContent<?, ?> content, ElementContext context, Nav nav, PageIndex pageIndex) Writes the given nav.static voidwriteSection(ServletRequest request, AnyPalpableContent<?, ?> content, ElementContext context, Section section, PageIndex pageIndex) Writes the given section.static voidwriteSectioningContent(ServletRequest request, AnyPalpableContent<?, ?> content, ElementContext context, SectioningContent sectioningContent, IOFunction<AnySectioningContent<?, ?>, NormalText<?, ?, ?, ? extends AnyFlowContent<?, ?>, ?>> htmlElement, PageIndex pageIndex) Writes the given section.static voidwriteToc(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-AnyPalpableContenthas bothAnyHeadingContentandAnySectioningContent- Throws:
IOExceptionServletExceptionSkipPageException
-
writeAside
public static void writeAside(ServletRequest request, AnyPalpableContent<?, ?> content, ElementContext context, Aside aside, PageIndex pageIndex) throws IOException, ServletException, SkipPageExceptionWrites the given aside. -
writeSection
public static void writeSection(ServletRequest request, AnyPalpableContent<?, ?> content, ElementContext context, Section section, PageIndex pageIndex) throws IOException, ServletException, SkipPageExceptionWrites the given section.
-
