Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes JSF and the fly likes Multiple Spaces in a RichFaces SuggestionBox Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "Multiple Spaces in a RichFaces SuggestionBox" Watch "Multiple Spaces in a RichFaces SuggestionBox" New topic
Author

Multiple Spaces in a RichFaces SuggestionBox

J Miller
Ranch Hand

Joined: Oct 21, 2010
Posts: 62
I’m having some trouble with the RichFaces suggestionBox trimming multiple spaces from my input. I have a database table that I’m querying using a suggestionBox. Some of the entries will have multiple spaces (“A__B”, using _ as a space). If I type “A__B”, it works correctly, but if I type “A__” it trims all the spaces and just searches for “A”.

I understand that this is the default html behavior, but I need to try and find a way around it. I’ve tried using a converter (below) that converts to a non-breaking space (nbsp), and that’s not working. I’ve done some searches, but can’t seem to find a solution.

I’m using RichFaces 3.3.3 with JSF 1.2.

Any ideas on how to accomplish this?

Converter:
 
I agree. Here's the link: jrebel
 
subject: Multiple Spaces in a RichFaces SuggestionBox
 
Similar Threads
JSF2 Populate SelectOneRadio with Enum values
getAsObject never called
h:selectOneMenu - setting the correct value
Can I supply a Bean in selectItem.setValue()?
Custom Converter : no action