Class PrefixSuffixRenderer<A extends Action>

java.lang.Object
net.sf.basedb.clients.web.extensions.renderer.PrefixSuffixRenderer<A>
All Implemented Interfaces:
Renderer<A>, WrappingRenderer<A>

public class PrefixSuffixRenderer<A extends Action> extends Object implements WrappingRenderer<A>
A wrapping renderer for HTML output that can wrap the HTML generated by a parent renderer with a prefix and/or suffix.
Version:
2.12
Author:
Nicklas
Last modified
$Date: 2023-02-22 08:58:38 +0100 (Wed, 22 Feb 2023) $
  • Field Details

  • Constructor Details

    • PrefixSuffixRenderer

      public PrefixSuffixRenderer(JspContext context, String prefix, String suffix)
      Create a prefix/suffix renderer that has no initial parent.
      Parameters:
      context - The jsp context
      prefix - Optional prefix string
      suffix - Optional suffix string
    • PrefixSuffixRenderer

      public PrefixSuffixRenderer(JspContext context, Renderer<? super A> parent, String prefix, String suffix)
      Create a prefix/suffix renderer with an initial parent.
      Parameters:
      context - The jsp context
      parent - The initial parent renderer
      prefix - Optional prefix string
      suffix - Optional suffix string
  • Method Details

    • render

      @Deprecated public void render(A action)
      Deprecated.
      Description copied from interface: Renderer
      Render the action in the client application.
      Specified by:
      render in interface Renderer<A extends Action>
      Parameters:
      action - The action to render
    • render

      public void render(A action, Extension<? extends A> ext)
      Description copied from interface: Renderer
      Render the action in the client application.

      The default implementation of this method simply call the Renderer.render(Action) method.

      Specified by:
      render in interface Renderer<A extends Action>
      Parameters:
      action - The action to render
    • getParent

      public Renderer<? super A> getParent()
      Description copied from interface: WrappingRenderer
      Get the current parent renderer.
      Specified by:
      getParent in interface WrappingRenderer<A extends Action>
      Returns:
      A renderer or null if there is no parent
    • setParent

      public void setParent(Renderer<? super A> parent)
      Description copied from interface: WrappingRenderer
      Set a parent renderer. Some implementations may have restrictions on this method. For example, they may not allow a parent renderer to be set after the object has been constructed, or they may not allow the parent to be set to null, etc.
      Specified by:
      setParent in interface WrappingRenderer<A extends Action>
      Parameters:
      parent - The parent renderer that should be wrapped by this renderer