On 1 Jun 2004, at 22:04, Inger, Matthew wrote:

One other issue, when writing map objects, we get XML like
the following:

  <entry>
    <key>6</key>
    <value>
      <itemNo>6</itemNo>
      <itemName>GlobalParameter6</itemName>
      <itemDesc>Global Parameter for Betwixt</itemDesc>
      <parentItemNo>0</parentItemNo>
      <parentItemName/>
      <dataType value="8" valueAsInteger="8" desc="Boolean">
        <valueAsObject>8</valueAsObject>
      </dataType>
      <parameterValue>true</parameterValue>
    </value>
  </entry>

Shouldn't the "value" part have another subelement which represents
the type?  Otherwise, how is a map supposed to be read back in?

but having a subelement would make things so much easier :)

when the adder method for the map is strongly typed then betwixt can guess what type of object should be created. for example, if the adder is 'add(Key key, Value value)' then the type of the value object must be Value. of course, if Value happens to be an abstract class or an interface then there are more wrinkles. you'll probably need to use derived beans (which don't work properly at the moment :(

Is there something i'm missing?

yes, the refactoring branch ;)

this stuff can't really be made to work with the older reading design. there is still a lot of functionality missing around this area but it's reasonably easier to add with the new design :)

- robert


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



Reply via email to