You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Mauricio T. Ferraz" <ma...@cilix.com.br> on 2004/01/09 22:09:05 UTC
with formatKey ???
Anybody knows how can I show I CNPJ in this format (33.435.231/0001-27) ???
I my bean I just have number (33435231000127)
So I have to show with ". "and " / "
There are a way to put something in the resource bundle??? What??
[]´s
Mauricio
Re: with formatKey ???
Posted by "Daniel H. F. e Silva" <dh...@yahoo.com>.
Mauricio,
If you have access to JSTL in your server container you could try formatting taglib.
<fmt:formatNumber/> and <fmt:formatDate/> are two very useful tags. I use them a lot.
They accept formatting patterns like classes from java.text package (In fact, they use classes
from java.text package on their implementations). Take a look on any JSTL book or doc.
In worst case, you have to code a method or a custom taglib to transform your number attribute to
a String object and then process it to get proper formatting. I'm sure that is pretty easy.
Hope this posting is useful to you.
Regards,
Daniel Silva.
PS: Nice to see other brazilians in struts-users.
--- "Mauricio T. Ferraz" <ma...@cilix.com.br> wrote:
> Anybody knows how can I show I CNPJ in this format (33.435.231/0001-27) ???
> I my bean I just have number (33435231000127)
> So I have to show with ". "and " / "
> There are a way to put something in the resource bundle??? What??
>
> []�s
> Mauricio
__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org