File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Converter not found

 
Marco Noronha
Ranch Hand
Posts: 50
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17641
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
Pie
Posts: 17641
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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!!

 
dennis deems
Ranch Hand
Posts: 808
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic