If I have a java enum defined as a property of a Java Object, what are the best practices to work with this within a datasource.
The get is easy, I can just define a property within the datasource and then define a valueXPath as:
Assuming that I have a getOrdinal method.
and then for the displayField
How does the setter work however on the add/update. If I have the edit type as a select box with the valueField as the ordinal and a display field as the description? The DSRequest.getDataSource.setProperties() method is going to attempt to call myEnumPropertyName.setOrdinal(value), but that's not going to work.
So my question is, what's the best practice in Smart Client to use Java enum types with datasources?
The get is easy, I can just define a property within the datasource and then define a valueXPath as:
Code:
valueXPath="myEnumPropertyName/ordinal"
and then for the displayField
Code:
valueXPath="myEnumPropertyName/description"
So my question is, what's the best practice in Smart Client to use Java enum types with datasources?
Comment