Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within JSF
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
JSF
Display negative BigDecimal value in parenthesis without - sign
Amit K Jain
Ranch Hand
Posts: 55
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi,
Can someone please let me know how can I display -ve number in parenthesis without - sign?
e.g.
-12323.34 should be display as (12323.34)
Thanks
Amit
Krystian Gor
Ranch Hand
Posts: 30
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
1 Using
Java
public float getNumber(){ float number = -12323.34F; return Math.abs(number); }
then in
JSF
(#{manbean.number})
2. Using JSF
public float getNumber(){ float number = -12323.34F; return number; }
then in JSF
(#{manbean.number>0 ? manbean.number : -manbean.number})
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
RegEx space (How critical this spaces in exam?)
using javascript,change plus sign to minus sign in jsp
Extracting integers from strings
Flexible JUnit assertions with assertThat()
Question About Regex Chapter-6 K&B
More...