com.sencha.gxt.core.client
Annotation Type XTemplates.FormatterFactory


@Target(value={})
@Retention(value=RUNTIME)
public static @interface XTemplates.FormatterFactory

Declares that a class may act as a factory to provide formatter instances. Either the name attribute must be populated with the name that this factory will use in an XTemplate and the method getFormat will be called, or the methods must indicate a name and a methodName to be invoked on the factory.


Required Element Summary
 Class<?> factory
           
 
Optional Element Summary
 boolean acceptsNull
          True if the formatter can handle null values.
 XTemplates.FormatterFactoryMethod[] methods
          Allows methods to be defined on a formatter factory with a name other that getFormat, and allowed more than one factory method to be defined.
 String name
          The name of the formatter being registered.
 

Element Detail

factory

public abstract Class<?> factory

name

public abstract String name
The name of the formatter being registered. If blank, then methods() is assumed to contain factory methods instead.

Returns:
name of the formatter being registered.
Default:
""

methods

public abstract XTemplates.FormatterFactoryMethod[] methods
Allows methods to be defined on a formatter factory with a name other that getFormat, and allowed more than one factory method to be defined.

Returns:
one or more factory methods
Default:
{}

acceptsNull

public abstract boolean acceptsNull
True if the formatter can handle null values. If false, a null value will be rendered directly as an empty string.

Returns:
false if null values should be rendered as an empty string and not formatted
Default:
false


Copyright © 2012. All Rights Reserved.