Since the condition is only available in the database, you should use this:
<a4j:commandButton id="bob"
action="#{MyBacking.doAction}"
image="/img/btn.png"
reRender="stuff"
oncomplete="if (#{not empty MyBacking.myCondition} == true) {
#{rich:component('myModelPanel')}.show()
}"
ajaxSingle="true">
</a4j:commandButton>
source
share