Hi Viral,
I am using the Capco Mapper for data conversion because it basically allows
you to map from one abritrary structure to another.  I am not using the
standard bean getters and setters, but rather setters and getters that use
JXPath (http://cvs.apache.org/viewcvs/jakarta-commons/jxpath/).  The Capco
Mapper is highly extensible and can be extended (via sub-classing rather
than editing the original source) to transform virtually anything.  I am
able to convert from one bean to another, an XML DOM tree to bean hierarchy
(and vice versa) and from one DOM tree to another (had to write my own
getters and setters for XML DOM traversal, but that was no big deal).  You
can craft Converters that leverage java.text.MessageFormat to piece together
new strings from a resource bundle and some arguments, render a
java.util.Data according to a simple data format patter, or extract
information out of a string using regular expressions.  The architecture is
very flexible and well thought out.  The only problem I have seen with it is
that it references the old struts utilities that have now been moved to
commons.
-- Erik.

-----Original Message-----
From: Viral Tolat [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 27, 2001 12:13 PM
To: [EMAIL PROTECTED]
Subject: Data conversion


Is there any intent to modify the code to centralize conversion of
strings to objects and reverse? Currently, ConvertUtils is used to
convert strings to primitive objects, however, toString is used to
convert the object to a string.

We'd like to integrate in a data conversion framework but to do this
cleanly we need a cental place where all data conversion happens.  In
addition, we'd need to be able to access the request or page context in
order to provide custom conversions on a per page basis.

We've looked at the transformations extension and the Capco Mapper,
however, we don't see how the transformations can be used with html:text

tags to provide data conversion from strings to objects since the Tag is

not involved at all in this process.

Thanks


Reply via email to