« Return to Thread: Can a RadioChoice display input for null value?

Can a RadioChoice display input for null value?

by Robin Sander :: Rate this Message:

Reply to Author | View in Thread


Hello,

is it possible to get RadioChoice behave more like DropDownChoice  
concerning a null value?
Consider a RadioChoice defining a search parameter, e.g. two values  
'male' and 'female' and a third one
meaning "doesn't matter".
With a DropDownChoice I could easily use setNullValid(true) and then  
define a property <fieldID>.nullValid
which is them used for the null value.
Looking into the source it seems that DropDownChoice always adds  
getDefaultChoice() which does the
magic while RadioChoice does not. Can anyone elaborate on this topic?  
Is there a workaround?

Background is that I have dozens of enums with property files for  
localization and a self-written
EnumChoiceRenderer which does the localization. So if I have a  
property of (enum) type Gender
which defines Gender.MALE and Gender.FEMALE I can't easily define a  
special "NULL" value
without modifying the enum.
So the only option I see would be to really pass null to the  
RadioChoice or to define a special
enum (like GenderWithNull) for any enum I want to use in a RadioChoice.

regards,

Robin.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...

 « Return to Thread: Can a RadioChoice display input for null value?