You can use Java enums with the Modeler already (even with Cayenne 1.2). Not *selecting* from dropdown, but rather typing your enum class in the dropdown field.

Could you explain how are you planning to add enums to dropdowns? They are user defined classes after all.

Andrus


On Aug 9, 2007, at 3:25 PM, Michael Gentry wrote:

Another advantage of deciding on 1.5 is we can have native enumeration
support.  I would definitely like to see this in the modeler and could
try to add it (my Swing skills aren't so hot, but I can be stubborn).
I'd like to be able to define the enumerated values in the modeler and
be able to choose them in the data type pull downs.  Then hook into
the code generation to create the enumerations and have Cayenne
automatically register them.  Then your _Classes could have valid
setLoanType(com.foo.bar.LoanTypeEnum loanType) calls.

This is kind of what I've implemented with the enumerations example I
put on the wiki, but I'd like it to be much more native in Cayenne.
Any thoughts?

Thanks,

/dev/mrg

PS. At one point, my example didn't work under Java 5, but I suspect
that was a bug in the JVM.  I haven't tried it since, though.
PPS. Yeah, I need to get to work on this stuff ...


Reply via email to