hey Sebastian

i have some good news and some less good news:

the good news is that i've added a pluggable strategy for binding simple types (primitives at the moment). i hope that you should be able to subclass the new SimpleTypeMapper class with something a litte like:

/** Implementation binds strings to elements but everything else to attributes */
class StringsAsElementsSimpleTypeMapper extends SimpleTypeMapper {


        /**
         * Binds strings to elements but everything else to attributes
         */
        public Binding bind(
                            String propertyName,
                            Class propertyType,
                            IntrospectionConfiguration configuration) {
            if (String.class.equals(propertyType)) {
                return SimpleTypeMapper.Binding.ELEMENT;
            }
            return SimpleTypeMapper.Binding.ATTRIBUTE;
        }

}

the less good news is that i needed to add it on the refactoring branch (since the code involved on CVS HEAD has been refactored on the branch). so you'll need to grab the REFACTORING-BRANCH_2004-01-13 version of the source from cvs and build it yourself (probably using http://maven.apache.org).

i may get round to adding some documentation on it but again this will be on the branch.

- robert

On 1 Feb 2004, at 22:01, Sebastian wrote:

robert burrell donkin wrote:
hi sebastian
this feature is (at the moment) missing from betwixt (but is on the long list of features that betwixt needs before a proper release). it should be pretty easy to add. anyone want to volunteer to develop it?
- robert

Hi Robert,


thanks for your response, at least now I know.

I already had a look at the sourcecode but I'm lacking the right skills to add this feature to betwixt. So hopefully someone else is able and willing to do so.

Sebastian


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to