Have custom function in a EJB
Posted on 2009-07-01
I've a integer field in the database, that represent a status. I want to display a text instead of this textField. So I've added a function called
But when I do this, I've this error:
Caused by: javax.el.PropertyNotFoundException: The class 'datamodel.Deal' does not have the property 'TextStatus'.
After this I've tried to add a fake EJB field and I've now this error.
Internal Exception: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'TEXTSTATUS' in 'field list'
I understand theses errors but I don't know how to bypass them.
Why generating this in the EJB? Because I need to display it in a table, (rich:datatable), and I was thinking it was the easier way.
Have you an idea?