File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes Converter not found Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Converter not found" Watch "Converter not found" New topic
Author

Converter not found

Marco Noronha
Ranch Hand

Joined: Oct 30, 2012
Posts: 50
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

Joined: Jun 25, 2001
Posts: 15629
    
  15

Converters aren't ManagedBeans. You should be annotating them as @FacesConverter objects.

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


Customer surveys are for companies who didn't pay proper attention to begin with.
Marco Noronha
Ranch Hand

Joined: Oct 30, 2012
Posts: 50
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

Joined: Jun 25, 2001
Posts: 15629
    
  15

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

Joined: Oct 30, 2012
Posts: 50
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

Joined: Mar 12, 2011
Posts: 808
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
 
subject: Converter not found
 
Similar Threads
unable to type case
Custom converter Error in h:SelectOneMenu
inputRichText with Hexadecimal formatted data
JSF2 Populate SelectOneRadio with Enum values
Illegal Argument in Custom Converter