[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3824: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3247)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3826: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3247)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3827: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3247)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3828: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3247)
Next Framework • Ver Tópico - Concatenar Código - Descrição
Página 1 de 1

Concatenar Código - Descrição

MensagemEnviado: Qua Jan 11, 2012 3:44 pm
por gerfferson
Boa tarde!

Como faço para concatenar no getDescricao o código e a descrição:
Exemplo:
private Long codigo;
private String descricao;

getDescricao(){
return codigo + "-" + descricao;
}

Quando faço isso, a cada reload na página o código e duplicado: Ex.: 1 - Descrição; 1 - 1 - Descrição; 1 - 1 - 1 - Descrição.

Grato pela ajuda!

Re: Concatenar Código - Descrição

MensagemEnviado: Qua Jan 11, 2012 4:44 pm
por jtakata
Não sei se é o caso mas eu usei um campo transiente.

Re: Concatenar Código - Descrição

MensagemEnviado: Qui Jan 12, 2012 10:43 am
por rogelgarcia