• 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

What is the exact role of converter in JSF

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

Can you please tell me the exact behavior of converter
in JSF.

Like what exactly it will do.?

Thanks,
Ram
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I hate posting the obvious, but it converts things. So, basically everything that is passed from the page back to the server is in String format, so if there is a date or a boolean, that String has to be converted into the appropriate backing bean's type for those attributes.

Sometimes, you might not have a standard conversion between String and what type you have on the server, and you might have to create your own converter. So JSF has an interface and you write the code to convert the Form data into whatever object you need.

Mark
 
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This article perfectly illustrates when a converter is useful:
http://balusc.blogspot.com/2007/09/objects-in-hselectonemenu.html
reply
    Bookmark Topic Watch Topic
  • New Topic