<f:facet name="footer">
<h:panelGroup>
<h:panelGroup>
<h:commandButton id="newButton0" action="" style="font-weight: bold;"> marcacaoConsulta" value="New" style="margin-top: 5px;" immediate="true"/>
</h:panelGroup>
<h:panelGroup rendered=" #{consulta.id != null}">
<h:commandButton id="newButton1" action="" style="font-weight: bold;">marcacaoConsulta " value="New" style="margin-top: 5px;" immediate="true"/>
</h:panelGroup>
</h:panelGroup>
<f:facet>
The 2 commandButton call the action "marcacaoConsulta" but just the first in (newButton0) works, the second redisplay the page.
Thats happen beacuse i put this #{consulta.id != null} in my rendered attribute... so when the consulta have a id property that's not null the button is rendered, but the action of this button is not call and the page is redisplay... I put one above that ( newButton0) that the panel group that's don't have a rendered attribute and he works fine... when i see the source the buttons is rendered in the same way, oi cannot understand why one works and other don't:
<input id="pacienteViewForm:newButton0" name ="pacienteViewForm:newButton0" type="submit" value= "Nova consulta 0" onclick="clear_pacienteViewForm();" style= "margin-top: 5px;" />
<input id="pacienteViewForm:newButton1" name="pacienteViewForm:newButton1" type="submit" value="Nova consulta" onclick="clear_pacienteViewForm();" style="margin-top: 5px;" />

