Hi,
you could use an action group and compute the condition:
<xp:button value="Label" id="button2">
<xp:eventHandler event="onclick" submit="true" refreshMode="complete">
<xp:this.action>
<xp:actionGroup>
<xp:this.condition>
<![CDATA[#{javascript:if( document1.getItemValueString("author").equals("123") ) return true;
return false
}]]>
</xp:this.condition>
<xp:changeDocumentMode mode="toggle"></xp:changeDocumentMode>
</xp:actionGroup>
</xp:this.action>
</xp:eventHandler>
</xp:button>
Hope this helps
Sven