def displayValue(self): value = [] for token in self.value: # Ignore no value entries. They are in the request only. if token == self.noValueToken: continue term = self.terms.getTermByToken(token) if zope.schema.interfaces.ITitledTokenizedTerm.providedBy(term): value.append(translate( term.title, context=self.request, default=term.title)) else: value.append(term.value) return value
def displayValue(self): value = [] for token in self.value: # Ignore no value entries. They are in the request only. if token == self.noValueToken: continue term = self.terms.getTermByToken(token) if zope.schema.interfaces.ITitledTokenizedTerm.providedBy(term): value.append( translate(term.title, context=self.request, default=term.title)) else: value.append(term.token) return value
def displayValue(self): value = [] for token in self.value: # Ignore no value entries. They are in the request only. if token == self.noValueToken: continue try: term = self.terms.getTermByToken(token) except LookupError: # silently ignore missing tokens, because INPUT_MODE and # HIDDEN_MODE does that too continue if zope.schema.interfaces.ITitledTokenizedTerm.providedBy(term): value.append(translate( term.title, context=self.request, default=term.title)) else: value.append(term.value) return value