Wouldn�t it
be nice if the EnumerationTranslator would have a default input
field?
This would
fit better to the enum value semantics which do not have null
values!?
The
enumeration translator currently of the
form:
enumeration,class-name,input=field-name[,input=field-name]*
could be extended to handle default field names instead of returning �null�, like:
enumeration,class-name,input=field-name[,input=field-name]*[,default=field-name]
enumeration,class-name,input=field-name[,input=field-name]*
could be extended to handle default field names instead of returning �null�, like:
enumeration,class-name,input=field-name[,input=field-name]*[,default=field-name]
The
translator only should return �null� if no default field name is
specified.
This change
would �only� change the semantics of the current
EnumerationTranlator
if someone
has input which is �default�! In such a case a �null� input
would
return the
�defined� default input field!
To avoid
this, some very strange default input marker could be used, such as a
asterisk:
enumeration,class-name,input=field-name[,input=field-name]*[,*=field-name]
enumeration,class-name,input=field-name[,input=field-name]*[,*=field-name]
Stefan
