コントロールにフォーカスが移動したときに、イベントハンドラを有効にします。
<xp:eventHandler event="onfocus" attributes>content</xp:eventHandler>
<xp:inputText id="inputText2">
<xp:eventHandler event="onfocus" submit="true"
refreshMode="complete">
<xp:this.action>
<![CDATA[#{javascript:requestScope.status = "Input box on focus"}]]>
</xp:this.action>
<xp:this.script>
<![CDATA[return confirm("Do you want to submit?")]]>
</xp:this.script>
</xp:eventHandler>
</xp:inputText>