Estou tentando realizar uma coisa aparentemente simples, mas estou tomando uma surra danada... Estudando, li que o Primefaces tem uma api javascript / jquery, então decidi dar uma olhada. Acontece que não consigo ocultar (hide), um botão de forma alguma, tentei de várias maneiras e nada...
Estou postando abaixo algumas das formas que tentei, se eu estiver esquecendo algo, por favor, me ajudem :)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui">
<h:head>
</h:head>
<h:body>
<h:form id="form1">
<p:commandButton value="Hide" onclick="PF('oi1').hide();" id="aa1" update="form1" />
<p:commandButton id="hh1" widgetVar="oi1" value="teste" />
<br></br>
<p:commandButton value="Hide" onclick="PF('form1:oi2').hide();" id="aa2" update="form1" />
<p:commandButton id="hh2" widgetVar="oi2" value="teste" />
<br></br>
<p:commandButton value="Hide" onclick="PF('#form1:oi3').hide();" id="aa3" update="form1" />
<p:commandButton id="hh3" widgetVar="oi3" value="teste" />
<br></br>
<p:commandButton value="Hide" onclick="PF('#oi4').hide();" id="aa4" update="form1" />
<p:commandButton id="hh4" widgetVar="oi4" value="teste" />
<br></br>
<p:commandButton value="Hide" onclick="oi5.hide();" id="aa5" update="form1" />
<p:commandButton id="hh5" widgetVar="oi5" value="teste" />
<br></br>
<br></br>
<br></br>
<p:commandButton value="Hide" onclick="PF('oi6').hide()" id="aa6" update="form1" type="button" />
<p:commandButton id="hh6" widgetVar="oi6" value="teste" />
<br></br>
<p:commandButton value="Hide" onclick="PF('form1:oi7').hide()" id="aa7" update="form1" type="button" />
<p:commandButton id="hh7" widgetVar="oi7" value="teste" />
<br></br>
<p:commandButton value="Hide" onclick="PF('#form1:oi8').hide()" id="aa8" update="form1" type="button" />
<p:commandButton id="hh8" widgetVar="oi8" value="teste" />
<br></br>
<p:commandButton value="Hide" onclick="PF('#oi9').hide()" id="aa9" update="form1" type="button" />
<p:commandButton id="hh9" widgetVar="oi9" value="teste" />
<br></br>
<p:commandButton value="Hide" onclick="oi10.hide()" id="aa10" update="form1" type="button" />
<p:commandButton id="hh10" widgetVar="oi10" value="teste" />
</h:form>
</h:body>
</html>