Class AbstractCustomListFormatterSupport<T>
java.lang.Object
name.matthewgreet.strutscommons.policy.AbstractPolicySupport<CustomListConversion>
name.matthewgreet.strutscommons.policy.AbstractListConverterSupport<CustomListConversion,T>
name.matthewgreet.strutscommons.policy.AbstractCustomListConverterSupport<T>
name.matthewgreet.strutscommons.policy.AbstractCustomListFormatterSupport<T>
- All Implemented Interfaces:
ListConverter<CustomListConversion,,T> Policy<CustomListConversion>
public abstract class AbstractCustomListFormatterSupport<T>
extends AbstractCustomListConverterSupport<T>
Template class for custom list converters that just format for a view helper. Subclasses must implement
ListConverter.getRecipientClass() and #format.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns result of conversion of form field.Returns message set by annotation.Returns message key set by annotation, which is used to retrieve message from Action's TextProvider if it's not empty string.Returns whether to write any error message to action errors, field errors, or action messages.booleanReturns name of field to receive converted form value, which can be empty string to use default.Methods inherited from class name.matthewgreet.strutscommons.policy.AbstractPolicySupport
getAnnotation, setAnnotationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface name.matthewgreet.strutscommons.policy.ListConverter
format, getRecipientClassMethods inherited from interface name.matthewgreet.strutscommons.policy.Policy
getAnnotation, setAnnotation
-
Constructor Details
-
AbstractCustomListFormatterSupport
public AbstractCustomListFormatterSupport()
-
-
Method Details
-
convert
public ConversionResult<T> convert(String formValue, Class<?> recipientFieldClass, Class<? extends T> recipientClass) Description copied from interface:ListConverterReturns result of conversion of form field. This is not called if the form value is empty string or null, unlessListConverter.getProcessNoValue()returns true.. -
getRecipientFieldName
Description copied from interface:ListConverterReturns name of field to receive converted form value, which can be empty string to use default.- Specified by:
getRecipientFieldNamein interfaceListConverter<CustomListConversion,T> - Overrides:
getRecipientFieldNamein classAbstractCustomListConverterSupport<T>
-
getMessageType
Description copied from interface:ListConverterReturns whether to write any error message to action errors, field errors, or action messages.- Specified by:
getMessageTypein interfaceListConverter<CustomListConversion,T> - Overrides:
getMessageTypein classAbstractCustomListConverterSupport<T>
-
getMessage
Description copied from interface:ListConverterReturns message set by annotation. Used ifListConverter.getMessageKey()is empty string or it fails to find a message.- Specified by:
getMessagein interfaceListConverter<CustomListConversion,T> - Overrides:
getMessagein classAbstractCustomListConverterSupport<T>
-
getMessageKey
Description copied from interface:ListConverterReturns message key set by annotation, which is used to retrieve message from Action's TextProvider if it's not empty string.- Specified by:
getMessageKeyin interfaceListConverter<CustomListConversion,T> - Overrides:
getMessageKeyin classAbstractCustomListConverterSupport<T>
-
getProcessNoValue
public boolean getProcessNoValue()Description copied from interface:ListConverterReturns whether#convertconverts empty string value, and#formatformats null value or empty collection.- Specified by:
getProcessNoValuein interfaceListConverter<CustomListConversion,T> - Overrides:
getProcessNoValuein classAbstractCustomListConverterSupport<T>
-