commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Husted <>
Subject Re: [DynaBean] a couple of other existing projects...
Date Thu, 03 Jan 2002 13:48:45 GMT
James Strachan wrote:
> For things like type converters that turn Strings to and from other data
> types such as Number and Date, I was thinking these converters should be
> moved to a Controller as they can be environment or framework dependent.
> e.g. validation might result in a localized message being produced to be
> displayed in a UI. Or arbitrary formatting rules could be applied to display
> property values.
> So I was musing about the idea of having a BeanController facade to a
> DynaBean (or regular JavaBean) that used Strings and was responsible for
> doing the type conversions and validation messages, having Locale,
> ResourceBundles and whatnot, seemed better than forcing a DynaClass to
> understand these i18n issues.

David Winterfeldt's validator (already accepted as a Commons product)
uses an XML configuration file to store these kind of properties for a

This can then be used in collaboration with a controller to perform a
primia facia validation, and generate localized messages and what not. 

This would be the sort of thing that could also be stored with a column
helper inside the DynaBean. The controller could then run down the
objects stored in the DynaBean and trigger the validations/conversions,
rerouting control if one or more fail. 

Of course, the DynaBean would not need to be aware of any of this, it is
just encapsulating the column helpers. The controller could be calling
the triggers on DynaBean members (which it would know are all column
helper objects).  

I'm thinking we could merge what David's validator does with a column
helper that also supported a data-entry buffer, and define everything
about a column in one place. You know, like Access or FileMakerPro ;-)

The nice part about doing this with a DynaBean, is that we get what
appears to be a standard JavaBean, but is actually being assembled from
component objects. 

Again, this would not be in the DynaBean package per se, but another
package using the DynaBean as a proof of concept.

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Building Java web applications with Struts.
-- Tel +1 585 737-3463.
-- Web

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message