0
<ui:define name="titulo da pagina">Cadastro De Bairro</ui:define>
<ui:define name="miolo">
<div class="conteudo_do_modulo">
<h:form id="Salvar" acceptcharset="ISO-8859-1" lang="pt_BR">
<fieldset>
<ui:fragment rendered="#{!BairroBean.editar}">
<h:outputLabel value="Cadastrar novo Bairro" />
<h:inputText value="#{BairroBean.nomeNovo}" id="novoBairro" />
<h:commandButton value="Salvar"
action="#{BairroBean.salvarBairro()}" />
<br />
<br />
</ui:fragment>
<ui:fragment rendered="#{BairroBean.editar}">
<h:outputLabel value="Valor Atual" for="nomeAntigo" />
<h:inputText value="#{BairroBean.nomeAntigo}" readonly="true" id="nomeAntigo" />
<h:inputHidden value="#{BairroBean.nomeAntigo}" id="valorAntigo" />
<br /> <br />
<h:outputLabel value="Digite O Novo Bairro" for="novoBairro2" />
<h:inputText value="#{BairroBean.nomeNovo}" id="novoBairro2" />
<h:commandButton value="Alterar" action="#{BairroBean.editarBairro()}" />
</ui:fragment>
</fieldset>
</h:form>
</div>
</ui:define>
personal I’m having a doubt, because only a commandbuttom works already solved prblema but wanted to know why. even though I say when they should render only the 'Save' button works, I had to separate in two form to solve.
1)-tried to take out the ui:Ragment ai worked, before it was a ui:Ragment for each knob with the condition to render.
2) I tried to leave a block with outputformat and did not give logic. just leave one block with ui:Ragment and the other to appear when you want
3) I even tried to do the logic on the buttons 'save' and 'change' also did not give.
methods check, so much so that it was only divided into 2 Forms and worked. the Beans are scope of request.
Thank you all ^^
Probably because of this
– Bruno César
is a boy, check d++++ this answer. thank you very much, even if you solved the problem you had to know why vlww
– micael