Class HtmlFragment


public class HtmlFragment extends RawHtml
A container for loading and displaying HTML content from external files.

This class extends RawHtml to provide functionality for loading HTML fragments from files and embedding them in the page. The content is read from the file during the create phase and inserted as raw (unescaped) HTML.

When loading a complete HTML document, the class automatically extracts just the body content, stripping the DOCTYPE, html, head, and body wrapper tags.

Since:
2007
Version:
1.0
Author:
Marvin P. Warble Jr.
See Also:
  • Constructor Details

    • HtmlFragment

      public HtmlFragment(String filename)
      Creates a new HtmlFragment that loads HTML content from the specified file.
      Parameters:
      filename - The path to the HTML file to load.
  • Method Details

    • create

      protected void create()
      Description copied from class: Element
      Hook method called during element creation.

      Override this method to configure the element after initialization. This is called after Element.initialize() and only once during the element's lifecycle.

      Overrides:
      create in class Element