Class WebTextBoxDepictor<C extends TextBox>

Type Parameters:
C - The type of component being depicted.
All Implemented Interfaces:
io.clogr.Clogged, ComponentDepictor<C>, Depictor<C>, WebComponentDepictor<C>, WebDepictor<C>

public class WebTextBoxDepictor<C extends TextBox> extends AbstractSimpleWebComponentDepictor<C> implements io.clogr.Clogged
Strategy for rendering a text component as an XHTML <div> element or, based upon TextBox.getTextContentType(), a specialized XHTML element.
Author:
Garret Wilson
  • Constructor Details

    • WebTextBoxDepictor

      public WebTextBoxDepictor()
      Default constructor using the XHTML <div> element.
  • Method Details

    • getLocalName

      public String getLocalName()
      Determines the local name of the XML element.

      This version returns special section elements if the component is a SectionComponent with a non-null section type.

      Overrides:
      getLocalName in class AbstractWebComponentDepictor<C extends TextBox>
      Returns:
      The local name of the element with no prefix, or null if this component should not be rendered as an element.
    • depictChildren

      protected void depictChildren() throws IOException
      Depicts any child components.

      This version does not call the super version, because all child rendering is controlled by this version.

      Overrides:
      depictChildren in class AbstractComponentDepictor<C extends TextBox>
      Throws:
      IOException - if there is an error updating the child depictions.
    • updateElement

      protected void updateElement(Element element) throws IOException
      Renders an XML element. If there is a child component with constraints indicating the same ID as this element, that child component will be rendered in place of this element.
      Parameters:
      element - The element the content of which should be rendered.
      Throws:
      IOException - if there is an error rendering the component.
    • updateElementContent

      protected void updateElementContent(Element element) throws IOException
      Renders the content of an XML element.
      Parameters:
      element - The element the content of which should be rendered.
      Throws:
      IOException - if there is an error rendering the component.