Re: How would I create this special enum converter?
It would be very simple to write your
own converter to get the behavior you want. Download the source
and take a look at the EnumConverter, then modify as needed. Then
simply add an init section to your dwr.xml where you define the
new converter (and of course add a convert element for SpecialEnum
using the new converter).
On 04/02/2014 02:58 PM, Dave Alvarado wrote:
I’m using DWR 3.0.0-rc2. I want to define a converter for
an enum I have created, but it doesn’t quite conform to the
way the documentation talks about enum conversions. My enum
SpecialEnum(final String name)
this.name = name;
private final String name;
public String toString()
public String getName()
defined as “second subject”, it will be interpreted as
SpecialEnum.SUBJECT2 on the server side and vice-versa. What
is the simplest way to do this?