JDK-6219769 : RFE: PropertyEditor Support for Enum
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: java.beans
  • Affected Version: 5.0
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2005-01-20
  • Updated: 2017-05-19
  • Resolved: 2011-03-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7 b07Fixed
Related Reports
Relates :  
Relates :  
Description
A DESCRIPTION OF THE REQUEST :
The PropertyEditorManager only supports a one to one relation for classes. Now for an Enum there could easily be a generic PropertyEditor, that returns the proper enum for a given string representing the name.

JUSTIFICATION :
Otherwise Enum's can not be used in JavaBean properties.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
After the PropertyManager unsuccessfully searched the searchPath it should check if the targetType is an Enum. If it is it should return the EnumPropertyEdit, which it initializes with the targetType (thus the generic class nows which actual Enum to take)

The Text given (setAsText) to the EnumPropertyEditor should be Enum.name().

ACTUAL -
Not there
###@###.### 2005-1-20 22:03:47 GMT

Comments
EVALUATION We should create appropriate editor and support it in PropertyEditorManager.findEditor
07-12-2006