Class HTMLFlow


public class HTMLFlow extends Component<HTMLFlow>

This component places custom HTML content on the interface.

The component itself has no visual representation, only the HTML content will be visible. The HTML content is added to the HTML DOM. Because of this, event handlers cannot be added to this component.

Since:
4.0
Author:
JBStrap
  • Constructor Details

    • HTMLFlow

      public HTMLFlow(String html)
      Creates a HTMLFlow component with the specified HTML content.
      Parameters:
      html - The custom HTML content that will be placed in the HTML DOM.
      Throws:
      IllegalStateException - If the HTMLFlow component's annotation was assigned to be both Private and Public.
  • Method Details

    • getHTML

      public String getHTML()
      Gets the HTML content from the component
      Returns:
      The HTML content
    • setHTML

      public HTMLFlow setHTML(String html)
      Sets the HTML content of the component
      Parameters:
      html - The custom HTML content that will be placed in the HTML DOM.
      Returns:
      The HTMLFlow component
    • writeHTML

      public boolean writeHTML(StringWriter writer)
      Description copied from class: Component
      Creates the component's HTML equivalent

      This method doesn't need to be used during application development. This method is used when developing a custom component. When creating a custom component, this method needs to be implemented. In the parameter (StringWriter class) the component's HTML equivalent must be specified, and the method has to return with a Boolean value. This boolean value determines if the component was drawn. If the user doesn't have access right to the component, or if the component couldn't be drawn, it should return with false. Otherwise, it must return with true.

      Specified by:
      writeHTML in class Component<HTMLFlow>
      Returns:
      If the componentwas drawn, true, otherwise false
    • addComponent

      public HTMLFlow addComponent(Component component)
      This component cannot have any other components assigned to it, it is only used to display custom HTML content.
      Overrides:
      addComponent in class Component<HTMLFlow>
      Parameters:
      component - The component to be added
      Returns:
      The component
      Throws:
      UnsupportedOperationException - In every case
    • redraw

      public HTMLFlow redraw()
      Redraws the component.

      All changes on the components, (even after drawing) are applied automatically. So for this reason, the components don't have to be redrawn. However, sometimes it is necessary to redraw the entire component. If this method is used, the component and all of its subcomponents will be re-sent to the client-side and the components will be re-initialized, a process that can take a significant amount of time, not to mention burden the communication channels. The use of this method for these reasons is not recommended.

      Overrides:
      redraw in class Component<HTMLFlow>
      Returns:
      The component
    • setEnabled

      public HTMLFlow setEnabled(boolean enabled)
      Sets the component to be enabled. Defaults to true
      Overrides:
      setEnabled in class Component<HTMLFlow>
      Parameters:
      enabled - true, the component is enabled, otherwise it's disabled
      Returns:
      The component
    • getId

      public String getId()
      Static HTML text display component for HTMLFlow. No ID is assigned to the component.
      Overrides:
      getId in class Component<HTMLFlow>
      Returns:
      Empty string