#NEWLINE# @ decorate_set_on_listener ( 'onenter' , '(self,new_value)' ) #NEWLINE# def set_on_enter_listener( self , listener , funcname ) : #NEWLINE# #INDENT# 'Registers the listener for the Widget.onenter event.\n\n        Note: the listener prototype have to be in the form on_textinput_enter(self, new_value) where new_value is\n            the new text content of the TextInput.\n\n        Note: Overwrites Widget.onkeydown.\n\n        Args:\n            listener (App, Widget): Instance of the listener. It can be the App or a Widget.\n            funcname (str): Literal name of the listener function, member of the listener instance\n        ' #NEWLINE# self . attributes [ self . EVENT_ONKEYDOWN ] = ( "\n            if (event.keyCode == 13) {\n                var params={};\n                params['new_value']=document.getElementById('%(id)s').value;\n                document.getElementById('%(id)s').value = '';\n                document.getElementById('%(id)s').onchange = '';\n                sendCallbackParam('%(id)s','%(evt)s',params);\n                return false;\n            }" % { #NEWLINE# #INDENT# 'id' : id ( self ) , #NEWLINE# 'evt' : funcname . EVENT_ONENTER , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . eventManager . register_listener ( self . EVENT_ONENTER , listener , funcname )