This is a known bug... basically, the type conversion would only be invoked if your expression is relatively "simple". What I mean is that:
Won't Work: <ww:property value="foo.bar.baz"/> Will work: <ww:push value="foo"> <ww:property value="bar.baz"/> </ww:push> Will work: <ww:push value="foo.bar"> <ww:property value="baz"/> </ww:push> Basically, "baz" will only be converted if it's the first or second "expression". This is due to general weirdness about how I handle looking at CurrentEvaluations and LastEvaluations in the typeconversion framework. I need to speak with Drew Davidson (Ognl guy) about how I can make this less sucky. -Pat ----- Original Message ----- From: "Adam Fleming" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, October 01, 2003 11:10 AM Subject: Re: [OS-webwork] Type conversion > > I have attempted to use a type converter in the perscribed method, and > indeed it does work when converting from String to an Object, but it > doesn't get invoked when printing the result via ww:property. > > Is this a common problem? Is there something I need to do to ensure the > type conversion is applied both on read and write ? > > Thanks > > -af > > > >>-----Original Message----- > >>From: Patrick Lightbody [mailto:[EMAIL PROTECTED] > >>Sent: Wednesday, October 01, 2003 11:04 AM > >>To: [EMAIL PROTECTED] > >>Subject: Re: [OS-webwork] Type conversion > > >>You can convert to and from string very easily. Just register a type > >>converter for type Foo and that converter will be called for > >>conversion from > >>a string and conversion to a string. > > >>You can also convert on individual fields: > > >>MyAction-conversion.properties: > >>blah=com.blah.BlahConverter > >> > >>That will be used for field blah in the class MyAction. > >> > >>-Pat > >> > >> > >> > >>>From: "John Patterson" <[EMAIL PROTECTED]> > >>>Reply-To: [EMAIL PROTECTED] > >>>To: "Webwork" <[EMAIL PROTECTED]> > >>>Subject: [OS-webwork] Type conversion > >>>Date: Wed, 1 Oct 2003 14:41:58 +0100 > >>> > >>>What is happening with the type conversion functionality? I > >> > >>need to be > >> > >>>able to override the conversion both to and from string easily. > >>>xwork-conversion.properties only allows me to specify one way. > >>> > >>>Is there any plans to allow you to configure a converter > >> > >>seperatly for > >> > >>>each > >>>property? For example, I have several dates which appear on > >> > >>a page in > >> > >>>different formats. It would be great to be able to specify > >> > >>in xwork.xml > >> > >>>the format to be used for each property. Or would this be > >> > >>best handled in > >> > >>>a tag lib (to presentation specific)? > >>> > >>>Maybe if the PropertyTag had a format attribute which was somehow > >>>passed to > >>>the TypeConverter... > >>> > >>><ww:property value="startDate" format="dd MMM yyyy"/> > >>> > >>>...or something like that. > >>> > >>>John. > >> > >>_________________________________________________________________ > >>Instant message in style with MSN Messenger 6.0. Download it > >>now FREE! > >>http://msnmessenger-download.com > >> > >> > >> > >>------------------------------------------------------- > >>This sf.net email is sponsored by:ThinkGeek > >>Welcome to geek heaven. > >>http://thinkgeek.com/sf > >>_______________________________________________ > >>Opensymphony-webwork mailing list > >>[EMAIL PROTECTED] > >>https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork > >> > > > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by:ThinkGeek > > Welcome to geek heaven. > > http://thinkgeek.com/sf > > _______________________________________________ > > Opensymphony-webwork mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by:ThinkGeek > > Welcome to geek heaven. > > http://thinkgeek.com/sf > > _______________________________________________ > > Opensymphony-webwork mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Opensymphony-webwork mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork > ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork