Trigger a button Click with text entry

Try this, Jython is a structured language so white space matters. Where many languages have brackets to determine scope, Python/Jython uses white space for this. Use two spaces for indention or a tab

if event.propertyName == 'text':
  button = event.source.parent.getComponent('button 2')
  button.doClick()
2 Likes