This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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: 15959
    
  19

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: 15959
    
  19

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
inputRichText with Hexadecimal formatted data
Custom converter Error in h:SelectOneMenu
unable to type case
Illegal Argument in Custom Converter
JSF2 Populate SelectOneRadio with Enum values