org.kuali.rice.kns.web.format
Class ArrayFormatter

java.lang.Object
  extended by org.kuali.rice.kns.web.format.Formatter
      extended by org.kuali.rice.kns.web.format.ArrayFormatter
All Implemented Interfaces:
Serializable

public class ArrayFormatter
extends Formatter

Currently, in the Formatter class, array are formatted by returning the first item in the array. This is not acceptable in some cases.

One example is a struts multi-select dropdown. In order for struts to correctly handle field highlighting struts expects an array.

This formatter does not handle null arrays or arrays with null items. This class may need to be modified to handle these conditions.

See Also:
Serialized Form

Field Summary
private static long serialVersionUID
           
 
Fields inherited from class org.kuali.rice.kns.web.format.Formatter
CREATE_MSG, propertyType, settings
 
Constructor Summary
ArrayFormatter()
           
 
Method Summary
 Object formatObject(Object value)
          Returns the value passed in.
 
Methods inherited from class org.kuali.rice.kns.web.format.Formatter
convertFromPresentationFormat, convertToArray, convertToCollection, convertToObject, findFormatter, format, formatArray, formatBean, formatCollection, formatForPresentation, formatNull, formatterForType, getFormatter, getFormatter, getImplementationClass, getNullObjectValue, getPropertyType, getSettings, isBlank, isEmptyValue, isNullValue, isSupportedType, registerFormatter, setPropertyType, setSettings, trimString, unwrapString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

ArrayFormatter

public ArrayFormatter()
Method Detail

formatObject

public Object formatObject(Object value)
Returns the value passed in. May be overridden by subclasses to provide custom formatting behavior. Provides default formatting implementation for primitive types. (Note that primitive types are will always be wrapped in an array in order to be passed as an argument of type Object).

Overrides:
formatObject in class Formatter


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.