xfa.host.setFocus()

Did you know that starting with version 8.1, the setFocus() method can accept either a SOM expression or a node object?

For example,

xfa.host.setFocus(this);

xfa.host.setFocus(this.somExpression);