Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Conditionally display a richfaces modal panel

Quite simple:

    <a4j:commandButton id="bob"
        action="#{MyBacking.doAction}"
        image="/img/btn.png"
        reRender="stuff"
                oncomplete="#{not empty MyBacking.myCondition ? #{rich:component('myModelPanel')}.show()" : <do nothing>}"
        ajaxSingle="true">
    </a4j:commandButton>

Thats obviously invalid EL. What's the most concise method I conditionally show myModelPanel in this way?

Thanks IA

like image 689
volvox Avatar asked Nov 05 '22 13:11

volvox


1 Answers

Try calling empty JS method

like image 58
Max Katz Avatar answered Nov 16 '22 08:11

Max Katz