Interface HTMLDisplayerManager


  • @Role
    public interface HTMLDisplayerManager
    Provides a way to access the HTML Displayer for the given type.
    Since:
    10.11RC1
    Version:
    $Id: 7e7a9929cd7491897c585973ef0c49f71e329f20 $
    • Method Detail

      • getHTMLDisplayer

        <T> HTMLDisplayer<T> getHTMLDisplayer​(Type targetType)
                                       throws HTMLDisplayerException
        Retrieve the appropriate HTML Displayer based on the given type.
        Type Parameters:
        T - the type of the HTML Displayer
        Parameters:
        targetType - the type used to retrieve the HTML Displayer
        Returns:
        the HTML Displayer of type <T>
        Throws:
        HTMLDisplayerException - if the HTML Displayer cannot be found
      • getHTMLDisplayer

        <T> HTMLDisplayer<T> getHTMLDisplayer​(Type targetType,
                                              String roleHint)
                                       throws HTMLDisplayerException
        Retrieve the appropriate HTML Displayer based on the given type and hint.
        Type Parameters:
        T - the type of the HTML Displayer
        Parameters:
        targetType - the type used to retrieve the HTML Displayer
        roleHint - the component hint. Could be null for default component
        Returns:
        the HTML Displayer of type <T>
        Throws:
        HTMLDisplayerException - if the HTML Displayer cannot be found
      • display

        <T> String display​(Type targetType,
                           T value)
                    throws HTMLDisplayerException
        Type Parameters:
        T - the type of the HTML Displayer
        Parameters:
        targetType - the type used to retrieve the HTML Displayer
        value - the value on which the display is based on
        Returns:
        the html element based on the value and the type
        Throws:
        HTMLDisplayerException - if an error occurs during the display
      • display

        <T> String display​(Type targetType,
                           T value,
                           Map<String,​String> parameters)
                    throws HTMLDisplayerException
        Type Parameters:
        T - the type of the HTML Displayer
        Parameters:
        targetType - the type used to retrieve the HTML Displayer
        value - the value on which the display is based on
        parameters - parameters used while generating the html. Could be the attributes of an input for instance.
        Returns:
        the html element based on the value and the type
        Throws:
        HTMLDisplayerException - if an error occurs during the display
      • display

        <T> String display​(Type targetType,
                           T value,
                           Map<String,​String> parameters,
                           String mode)
                    throws HTMLDisplayerException
        Type Parameters:
        T - the type of the HTML Displayer
        Parameters:
        targetType - the type used to retrieve the HTML Displayer
        value - the value on which the display is based on
        parameters - parameters used while generating the html. Could be the attributes of an input for instance.
        mode - the display mode (view, edit, ...)
        Returns:
        the html element based on the value and the type
        Throws:
        HTMLDisplayerException - if an error occurs during the display