Hi,

This is actually a repost of a stackoverflow question that I've been
unable to get an answer for:

http://stackoverflow.com/questions/1644340/multiple-field-ognl-type-converter

My problem is that I have an immutable object that is captured in
multiple fields on the UI. The http post looks like:

    capture.id = 213
    capture.description = DescriptionText

Capture is a property of my new Value type and I have a TypeConverter
set-up and ready to convert the field 'capture'. The converter is
setup up such that it gets called if the input is:

    capture = foo

Since my value object is immutable I need to be able to construct it
with the value of  'id' and 'description'. I had the bright idea over
the weekend that the following would work:

    capture[id] = 213
    capture[description] = DescriptionText

This actually does a bit better in that my converter gets called, but
instead of being called with a map of values it gets called multiple
times once for each parameter.

The more I look at the Ognl stuff and the ParametersIntercepter the
more I've convincing my self that this is just not possible with the
framework, can anybody confirm this?

A similar problem I that I'm sure somebody must have looked at before
is having a separate input fields for day, month and year and have
them bound to a single Date instance on the action. I've been looking
for some references for this sort of thing, but haven't found the
right search term yet.

Gareth

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to