Beginner |
|
Joined: Wed Jul 25, 2007 6:32 am Posts: 22
|
How can I convert a char or int value into a String?
For example:
I have a table "USER" which has a column "ACTIVE" (Y/N), but could also be 0 or 1.
My Domain object User has a String property "active".
But in my jsf view page I want to display "Yes" or "No" instead of "Y" or "N"
What is the best way to do this?
Is it better to translate the column values directly to "Yes" or "No" when the User Object is filled by Hibernate. And how do I do this?
Or is it better to translate the "Y" and "N" in the User Object in my View to the desired format?
Can someone tell what is the best way, and how to do it?
|
|