That is a good point, but I am refreshing another part of the Xpage.
I can't get this to work even on a clean Xpage. I must be doing something stupid.
Here is my code:
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
<xp:this.onClientLoad><![CDATA[dojo.query("input[id$='inputText1']")[0].focus();]]></xp:this.onClientLoad>
<xp:inputText id="inputText1"></xp:inputText>
</xp:view>
If someone can point out my error I would greatly appreciate it.