Ioana Iacob

Greenhorn
+ Follow
since Mar 04, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ioana Iacob

Rory Evans wrote:I would be slightly cautious of using css to convert text to uppercase. This is because it only APPEARS as uppercase - the raw data is still in the exact case that you entered it.

This has caused problems for me on search screens where I am trying to match a search string with a record in the database. For example: the string 'USER1' is stored in the database. You type 'user1' into the search field on your jsf page (although, due to the css style, what you'll actually see is 'USER1'). You hit go and the application tries to match your search string with any records in the database. Of course, 'user1' is not the same as 'USER1' and so no matches are found. To the user, this appears very wrong since they are under the illusion that their text was converted to uppercase and the search should have therefore returned the record 'USER1'.

Hope this helps



You are right, but on the other hand, one could easily use string toUpperCase() and do an upper on the value in db (actually I often do this, at least this way I know both the strings I'm comparing are in uppercase). Plus the example on the forum was about an h:outputText, so I see no harm in using css rather than having more converters.
14 years ago
JSF
Hi,

Have you considered using css?

Ex: text-transform: uppercase;

Cheers.

14 years ago
JSF