public boolean canSetValue(String value) {
   if (value == null) {
     return true;
   }
   Iterator<SelectPosition> constants =
       ListSequence.fromList(SelectPosition.getConstants()).iterator();
   while (constants.hasNext()) {
     SelectPosition constant = constants.next();
     if (value.equals(constant.getName())) {
       return true;
     }
   }
   return false;
 }
 public String toInternalValue(String value) {
   if (value == null) {
     return null;
   }
   Iterator<SelectPosition> constants =
       ListSequence.fromList(SelectPosition.getConstants()).iterator();
   while (constants.hasNext()) {
     SelectPosition constant = constants.next();
     if (value.equals(constant.getName())) {
       return constant.getValueAsString();
     }
   }
   return null;
 }