def get_autocomplete_labels_async(self):
     self.getControl(9091).reset()
     if self.search_str:
         listitems = AutoCompletion.get_autocomplete_items(self.search_str)
     else:
         listitems = list(self.last_searches)
     self.getControl(9091).addItems(T9Utils.create_listitems(listitems))
 def onInit(self):
     self.get_autocomplete_labels_async()
     self.update_search_label_async()
     listitems = []
     for i, item in enumerate(KEYS):
         li = {"label": "[B]%s[/B]" % item[0],
               "label2": item[1],
               "key": item[0],
               "value": item[1],
               "index": str(i)
               }
         listitems.append(li)
     self.getControl(9090).addItems(T9Utils.create_listitems(listitems))
     self.setFocusId(9090)
     self.getControl(600).setLabel("[B]%s[/B]_" % self.search_str)