ariba.ui.validation
Class PipedFormatter
java.lang.Object
ariba.ui.aribaweb.util.AWBaseObject
ariba.ui.aribaweb.util.AWFormatter
ariba.ui.validation.PipedFormatter
- All Implemented Interfaces:
- AWObject, Compare
public final class PipedFormatter
- extends AWFormatter
- implements Compare
This formatter pipes String object values *backward* through its
coercion formatter, and then forward through its data formatter.
This is valuable when binding a UI field to an XML property that has
a canonical *string* representation for a number or date, than then needs
to be formatted by a conventional number or date formatter.
| Fields inherited from class ariba.ui.aribaweb.util.AWBaseObject |
AribaHashtableClass, AribaVectorClass, ClassClass, EmptyHashtable, EmptyMap, EmptyVector, False, IntegerClass, JavaHashtableClass, JavaMapClass, JavaVectorClass, LogHandling, NullObject, ObjectClass, StringClass, True, UndefinedObject, UndefinedString, UninitializedRealNumber |
|
Method Summary |
int |
compare(Object o1,
Object o2)
Compares objects two objects for sort order. |
String |
format(Object objectValue)
format the "object value" by first parsing the canonical string value, and then
passing that object value through our data formatter. |
Object |
parseCanonicalXMLString(String xmlValue)
|
Object |
parseObject(String stringToParse)
parse the presentation string by first parsing it into an objectValue, and
then formatting that into a canonical string representation |
PipedFormatter
public PipedFormatter(Object stringCoercionFormatter,
Object dataFormatter)
parseCanonicalXMLString
public Object parseCanonicalXMLString(String xmlValue)
format
public String format(Object objectValue)
- format the "object value" by first parsing the canonical string value, and then
passing that object value through our data formatter.
- Specified by:
format in class AWFormatter
parseObject
public Object parseObject(String stringToParse)
throws ParseException
- parse the presentation string by first parsing it into an objectValue, and
then formatting that into a canonical string representation
- Specified by:
parseObject in class AWFormatter
- Throws:
ParseException
compare
public int compare(Object o1,
Object o2)
- Description copied from interface:
Compare
- Compares objects two objects for sort order.
- Specified by:
compare in interface Compare
- Parameters:
o1 - the first object to compareo2 - the second object to compare
- Returns:
- a value less than, equal to, or greater than zero depending
on whether o1 is less than, equal to, or greater than
o2
AribaWeb User Interface Development Framework
Copyright © 2000-2009 Ariba, Inc. All Rights Reserved.