Search in sources :

Example 1 with DefaultNullFieldStrategy

use of org.apache.tapestry5.internal.DefaultNullFieldStrategy in project tapestry-5 by apache.

the class TapestryModule method contributeNullFieldStrategySource.

/**
 * Contributes strategies accessible via the {@link NullFieldStrategySource} service.
 *
 * <dl>
 * <dt>default</dt>
 * <dd>Does nothing, nulls stay null.</dd>
 * <dt>zero</dt>
 * <dd>Null values are converted to zero.</dd>
 * </dl>
 */
public static void contributeNullFieldStrategySource(MappedConfiguration<String, NullFieldStrategy> configuration) {
    configuration.add("default", new DefaultNullFieldStrategy());
    configuration.add("zero", new ZeroNullFieldStrategy());
}
Also used : DefaultNullFieldStrategy(org.apache.tapestry5.internal.DefaultNullFieldStrategy) ZeroNullFieldStrategy(org.apache.tapestry5.internal.ZeroNullFieldStrategy)

Aggregations

DefaultNullFieldStrategy (org.apache.tapestry5.internal.DefaultNullFieldStrategy)1 ZeroNullFieldStrategy (org.apache.tapestry5.internal.ZeroNullFieldStrategy)1