예제 #1
0
 def get_string_value(self, instance):
     """Override DataItem method"""
     value = self.get_value(instance)
     choices = self.get_prop_value("data", instance, "choices")
     # print "ShowChoiceWidget:", choices, value
     for choice in choices:
         if choice[0] == value:
             return to_text_string(choice[1])
     else:
         return DataItem.get_string_value(self, instance)
예제 #2
0
 def get_string_value(self, instance):
     """Override DataItem method"""
     value = self.get_value(instance)
     choices = self.get_prop_value("data", instance, "choices")
     #print "ShowChoiceWidget:", choices, value
     for choice in choices:
         if choice[0] == value:
             return to_text_string(choice[1])
     else:
         return DataItem.get_string_value(self, instance)