I have a registration screen with some attributes, which at the time of editing I do not want to load the password, because I just want to change the name and the email, that is, I want to hide the password column only in editing. p>
NOTE: All CRUDs are working.
CustomerCount.xhtml:
<p:fieldset legend="Clientes">
<h:panelGrid columns="2">
<p:outputLabel value="Nome: " for="nome" />
<p:inputText id="nome" value="#{cadastroClientesBean.cliente.nome}" />
<p:outputLabel value="E-mail: " for="email" />
<p:inputText id="email" value="#{cadastroClientesBean.cliente.email}"/>
<p:outputLabel value="Senha: " for="senha" />
<p:password id="senha" value="# {cadastroClientesBean.cliente.senha}"
required="true" requiredMessage="Senha obrigatória" />
<p:outputLabel />
<p:commandButton value="Salvar" action="# {cadastroClientesBean.gravar}"
icon="ui-icon-disk" update="@form" />
</h:panelGrid>
</p:fieldset>
CustomerContent.xhtml:
<p:dataTable value="#{consultaClientesBean.clientes}" var="cliente">
<p:column headerText="Nome">
<h:outputText value="#{cliente.nome}" />
</p:column>
<p:column headerText="E-mail">
<h:outputText value="#{cliente.email}" />
</p:column>
<p:column headerText="Ações" width="100" style="text-align: center">
<p:button icon="ui-icon-pencil" title="Editar" outcome="/admin/CadastroClientes">
<f:param name="id" value="#{cliente.id}" />
</p:button>
<p:commandButton icon="ui-icon-trash" title="Excluir"
process="@this" update="@form"
action="#{consultaClientesBean.excluir}">
<f:setPropertyActionListener value="#{cliente}" target="#{consultaClientesBean.clienteSelecionado}" />
</p:commandButton>
</p:column>
</p:dataTable>
NOTE: All CRUDs are working.