javasf@googlegroups.com
[Top] [All Lists]

Re: [javasf] Limpar campos da tela.

Subject: Re: [javasf] Limpar campos da tela.
From: Rafael Ponte
Date: Fri, 9 Apr 2010 14:58:12 -0300
Dependendo de como se esteja trabalhando talvez se faça necessário limpar a árvore de componentes (ou parte dela) também.

:-)

2010/4/9 Slack <slack.tux@xxxxxxxxx>
Se ainda tiver valores no Bean, vc pode colocar um action no botão e colocar null em todos os objetos... mas se vc quer limpar o formulário antes de submeter o mesmo, provavelmente o bean ainda não guardou nenhum valor.. a não ser que tenha algum ajax salvando a medida que for preenchendo ou perdendo o foco do componente..


2010/4/9 Sérgio Fantin <sergio.lnd.fantin@xxxxxxxxx>

Se estiver salvando(ou algo do tipo) um objeto:

public void save() {
        pessoaDao.save(pessoa);
        pessoa = new Pessoa();
}

Botão limpar simples:

<h:commandButton type="reset" value="Limpar"/>

... daí você usa a idéia do Slack.

2010/4/9 Herbert Fernando Martins <herbert.grupo@xxxxxxxxx>
então cara até pode mais preciso ver se isso vai limpar os valores do meu Bean.

Em 9 de abril de 2010 14:21, thiago moraes <thiagoampj@xxxxxxxxx> escreveu:

Poderia utilizar _javascript_ ?

2010/4/9 Herbert Fernando Martins <herbert.grupo@xxxxxxxxx>
Galera,

         Estou com dificuldades de implementar um botão que limpe os campos do formulario da tela. Alguem tem alguma sujestão estou usando, no projeto aqui estamos utilizando viewHelper.

att

Herbert Martins

--
http://groups.google.com/group/javasf
 
You received this message because you are subscribed to the Google
Groups "javasf: JavaServer Faces Group" group.
To post to this group, send email to javasf@xxxxxxxxxxxxxxxx



--
Thiago Alves de Moraes
thiagoampj@xxxxxxxxx

--
http://groups.google.com/group/javasf
 
You received this message because you are subscribed to the Google
Groups "javasf: JavaServer Faces Group" group.
To post to this group, send email to javasf@xxxxxxxxxxxxxxxx

--
http://groups.google.com/group/javasf
 
You received this message because you are subscribed to the Google
Groups "javasf: JavaServer Faces Group" group.
To post to this group, send email to javasf@xxxxxxxxxxxxxxxx



--
Sérgio Fantin
http://serjaum.wordpress.com

--
http://groups.google.com/group/javasf
 
You received this message because you are subscribed to the Google
Groups "javasf: JavaServer Faces Group" group.
To post to this group, send email to javasf@xxxxxxxxxxxxxxxx

--
http://groups.google.com/group/javasf
 
You received this message because you are subscribed to the Google
Groups "javasf: JavaServer Faces Group" group.
To post to this group, send email to javasf@xxxxxxxxxxxxxxxx



--
Rafael Ponte
http://www.rponte.com.br

--
http://groups.google.com/group/javasf
 
You received this message because you are subscribed to the Google
Groups "javasf: JavaServer Faces Group" group.
To post to this group, send email to javasf@xxxxxxxxxxxxxxxx
<Prev in Thread] Current Thread [Next in Thread>