FAQs
Search
Recent Topics
Flagged Topics
Hot Topics
Best Topics
Register / Login
This week's book giveaway is in the
Kotlin
forum.
We're giving away four copies of
Kotlin for Android App Development
and have Peter Sommerhoff on-line!
See
this thread
for details.
Win a copy of
Kotlin for Android App Development
this week in the
Kotlin
forum!
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
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Liutauras Vilda
Devaka Cooray
Jeanne Boyarsky
Bear Bibeault
Sheriffs:
Junilu Lacar
Paul Clapham
Knute Snortum
Saloon Keepers:
Ron McLeod
Tim Moores
Stephan van Hulst
salvin francis
Carey Brown
Bartenders:
Tim Holloway
Frits Walraven
Ganesh Patekar
Forum:
JSF Certification (OCEJSFD)
Another notes on standard converter
Himai Minh
Ranch Hand
Posts: 1714
12
posted 1 year ago
We can also use <f:convertNumber binding="{a converter instance}/>
This example is from memoryNotFound:
@ManagedBean @SessionScoped public class NumbersBean { private double amount = 13.24; private NumberConverter numberConverter; ... public NumberConverter getNumberConverter() { return numberConverter; } public void setNumberConverter(NumberConverter numberConverter) { numberConverter.setType("currency"); numberConverter.setCurrencySymbol("\u20AB"); this.numberConverter = numberConverter; } }
<h:outputText value="#{numbersBean.amount}" > <f:convertNumber binding="#{numbersBean.numberConverter}"/> </h:outputText>
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
Post Reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
How do I NOT require currency symbol on input, but still display it with convertNumber?
Build currency converter with object oriented programming using java
NumberConverter
ManagedBean Injecting doesn't work (JSF / Primefaces)
Value objects and encapsulation
More...