altitdb 25 de dez. de 2010
Faça assim:
rendered="#{param.act eq 1 ? true : false}"
eu faria assim!
xD~~
llucas 26 de dez. de 2010
Mas a questão do componente aparecer ou não, está funciomando
Deixa eu explicar melhor:
Trecho de página que faz include do cadastro
<ui:include src= "./clientecadastro.xhtml" />
<h:panelGroup rendered= "#{param.act eq 1 ? true : false}" >
<ui:include src= "./clientecadastro.xhtml" />
</h:panelGroup>
No primeiro include da linha 1 o cadastro funciona
No segundo include da linha 3 o mesmo cadastro não funciona.
Página de Cadastro
<? xml version = ' 1.0 ' encoding = ' UTF -8 ' ?>
<! 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 : h = "http://java.sun.com/jsf/html"
xmlns : p = "http://primefaces.prime.com.tr/ui" >
< h1 class = "ui-widget-header" style = "margin: 0px;" > Cadastro de Clientes </ h1 >
< h : form >
< p : growl id = "facesMessages" />
< h : panelGrid columns = "2" >
< h : column >
< td valign = "top" align = "right" >
< h2 align = "left" class = "ui-widget-header" style = "margin: 0px; width: 100%;" > Dados Pessoais </ h2 >
< h3 >
< h : outputText value = "Nome*: " />
< h : inputText value = "#{clienteBean.pessoa.nome}" style = "width: 160px;" required = "true" requiredMessage = "Informe o Nome do Cliente" />< br />
< h : outputText value = "Telefone 1: " />
< p : inputMask mask = "([telefone removido]" value = "#{clienteBean.pessoa.telefone1}" style = "width: 160px;" />< br />
< h : outputText value = "Telefone 2: " />
< p : inputMask mask = "([telefone removido]" value = "#{clienteBean.pessoa.telefone2}" style = "width: 160px;" />< br />
< h : outputText value = "Endereço: " />
< h : inputText value = "#{clienteBean.pessoa.endereco}" style = "width: 160px;" />< br />
< h : outputText value = "RG: " />
< p : inputMask mask = "9?99999999999999999999999" value = "#{clienteBean.pessoaRgNum}" style = "width: 120px;" />
< h : outputText value = " - " />
< p : inputMask mask = "9" value = "#{clienteBean.pessoaRgDig}" style = "width: 20px;" />< br />
< h : outputText value = "CPF: " />
< p : inputMask mask = "[CPF removido]" value = "#{clienteBean.pessoa.cpf}" style = "width: 160px;" />< br />
</ h3 >
</ td >
</ h : column >
< h : column >
< td valign = "top" align = "right" >
< h2 align = "left" class = "ui-widget-header" style = "margin: 0px; width: 100%;" > Dados Profissionais </ h2 >
< h3 >
< h : outputText value = "Local de Trabalho: " />
< h : inputText value = "#{clienteBean.pessoa.profissao.nome}" style = "width: 160px;" />< br />
< h : outputText value = "Telefone: " />
< p : inputMask mask = "([telefone removido] X 9?99999" value = "#{clienteBean.pessoa.profissao.telefone}" style = "width: 160px;" />< br />
< h : outputText value = "Função: " />
< h : inputText value = "#{clienteBean.pessoa.profissao.funcao}" style = "width: 160px;" />< br />
< h : outputText value = "Salário: " />
< h : inputText value = "#{clienteBean.pessoaSalario}" style = "width: 160px;" />< br />
< h : outputText value = "Endereço: " />
< h : inputText value = "#{clienteBean.pessoa.profissao.endereco}" style = "width: 160px;" />< br />
</ h3 >
</ td >
</ h : column >
</ h : panelGrid >
< div align = "right" >
< h : commandButton value = "Salvar" action = "#{clienteBean.salvar}" style = "background-image: url('./images/icones/Save.png'); margin-right: 10px;" styleClass = "ui-button-image" />
< h : commandButton value = "Cancelar" style = "background-image: url('./images/icones/Delete.png');" styleClass = "ui-button-image" />
</ div >
</ h : form >
</ html >
altitdb 26 de dez. de 2010
Você quer dizer que não funciona como??
Dá algum erro??
Como esta seu managedBean?
xD~~