Save This Page
Home » displaytag-1.1.1-src » org » displaytag » decorator » [javadoc | source]
org.displaytag.decorator
public class: DefaultDecoratorFactory [javadoc | source]
java.lang.Object
   org.displaytag.decorator.DefaultDecoratorFactory

All Implemented Interfaces:
    DecoratorFactory

Factory for TableDecorator or ColumnDecorator object.
Method from org.displaytag.decorator.DefaultDecoratorFactory Summary:
loadColumnDecorator,   loadTableDecorator
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.displaytag.decorator.DefaultDecoratorFactory Detail:
 public DisplaytagColumnDecorator loadColumnDecorator(PageContext pageContext,
    String decoratorName) throws DecoratorInstantiationException 

    If the user has specified a column decorator, then this method takes care of creating the decorator (and checking to make sure it is a subclass of the DisplaytagColumnDecorator object). If there are any problems loading the decorator then this will throw a DecoratorInstantiationException which will get propagated up to the page.

    Two different methods for loading a decorator are handled by this factory:

    • First of all, an object with key decoratorName is searched in the page/request/session/scope
    • If not found, assume decoratorName is the class name of the decorator and load it using reflection
 public TableDecorator loadTableDecorator(PageContext pageContext,
    String decoratorName) throws DecoratorInstantiationException 

    If the user has specified a decorator, then this method takes care of creating the decorator (and checking to make sure it is a subclass of the TableDecorator object). If there are any problems loading the decorator then this will throw a DecoratorInstantiationException which will get propagated up to the page.

    Two different methods for loading a decorator are handled by this factory:

    • First of all, an object with key decoratorName is searched in the page/request/session/scope
    • If not found, assume decoratorName is the class name of the decorator and load it using reflection