Class PrefixSuffixRenderer<A extends Action>

  • 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: 2009-04-01 14:58:27 +0200 (on, 01 apr 2009) $
    • Constructor Detail

      • 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 Detail

      • render

        public void render​(A action)
        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
      • 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