def onAction( self, action ):
     #try:
         # Cancel
         if ( action.getId() in CANCEL_DIALOG or self.getFocusId() == BUTTON_CANCEL and action.getId() in SELECT_ITEM ):
             array = []
             self.close()
         # Okay
         if ( self.getFocusId() == BUTTON_OK and action.getId() in SELECT_ITEM ):
             self.close()
         
         # Select or deselect item in list
         if ( action.getId() in SELECT_ITEM and self.getFocusId() == TAGS_LIST ):
             item = self.getControl( TAGS_LIST ).getSelectedItem()
             pos  = self.getControl( TAGS_LIST ).getSelectedPosition()
             
             kb = xbmc.Keyboard(item.getLabel2(),  _(30623)%( decoder.smart_utf8(item.getLabel())), False)
             kb.doModal()
             if (kb.isConfirmed()):
                 item.setLabel2(kb.getText())
                 MPDB.setTranslatedTagType(decoder.smart_unicode(item.getLabel()), decoder.smart_unicode(item.getLabel2()))
                 self.getControl( TAGS_LIST ).setVisible(False)
                 self.getControl( TAGS_LIST ).setVisible(True)