• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Converter not found

 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Guys, Is there something wrong with my converter?



Here is MyBase:



I don´t know what's happening.. I did it on an old project and it worked.
 
Saloon Keeper
Posts: 28750
211
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Converters aren't ManagedBeans. You should be annotating them as @FacesConverter objects.

I should mention also that Converters must be stateless and thread-safe.
 
Marco Noronha
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:Converters aren't ManagedBeans. You should be annotating them as @FacesConverter objects.

I should mention also that Converters must be stateless and thread-safe.



OOpps.. Your wrong there!

Converters CAN BE managedBeans!

the error was on the view:



thanks !!
 
Tim Holloway
Saloon Keeper
Posts: 28750
211
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Backing beans can contain converters, but that is just an additional aspect of the Backing Bean.

Documentation is unclear, but I'm pretty sure that when a Backing Bean implements Converter, it's intended to make the backing bean as a whole self-converting. In other words, if BeanX implements Converter, I don't expect the conversion methods to be receiving/emitting anything that isn't a BeanX.
 
Marco Noronha
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:Backing beans can contain converters, but that is just an additional aspect of the Backing Bean.

Documentation is unclear, but I'm pretty sure that when a Backing Bean implements Converter, it's intended to make the backing bean as a whole self-converting. In other words, if BeanX implements Converter, I don't expect the conversion methods to be receiving/emitting anything that isn't a BeanX.



You are right! That´s why my bean doesn´t implement Converter!!
My Generic (BaseConverter) does!!

 
Ranch Hand
Posts: 808
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Marco Noronha wrote:

Tim Holloway wrote:Backing beans can contain converters, but that is just an additional aspect of the Backing Bean.

Documentation is unclear, but I'm pretty sure that when a Backing Bean implements Converter, it's intended to make the backing bean as a whole self-converting. In other words, if BeanX implements Converter, I don't expect the conversion methods to be receiving/emitting anything that isn't a BeanX.



You are right! That´s why my bean doesn´t implement Converter!!
My Generic (BaseConverter) does!!



What's the advantage of a design like this? At first glance I would much rather have a separate, dedicated converter class that works on a specific type.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic