Interface Decorator


  • public interface Decorator
    Provides a decorator interface for delegating object rendering.

    Decorator Example

    The following example illustrates how to render a email hyperlink in a email table column.
     Column column = new Column("email");
    
     column.setDecorator(new Decorator() {
         public String render(Object row, Context context) {
             Customer customer = (Customer) row;
             String email = customer.getEmail();
             String fullName = customer.getFullName();
             return "<a href='mailto:" + email + "'>" + fullName + "</a>";
         }
     });
    
     table.addColumn(column); 
    See Also:
    Column, Table
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      String render​(Object object, org.openidentityplatform.openam.click.Context context)
      Returns a decorated string representation of the given object.
    • Method Detail

      • render

        String render​(Object object,
                      org.openidentityplatform.openam.click.Context context)
        Returns a decorated string representation of the given object.
        Parameters:
        object - the object to render
        context - the request context
        Returns:
        a decorated string representation of the given object