-
Feature Request
-
Resolution: Done
-
Major
-
None
-
None
-
None
There are a number of places in the UI (for example, as OPTIONS inside a SELECT box) that a textual representation of an entity's value is required. I'm open to how this should be done, but something like 'whenever a property is added to an entity, it is also added to the entity's toString() method' would suffice for my purposes.
Bonus points for limiting it to 'only required fields' or 'only the first 5 fields'
For example:
public class Customer {
public String getFirstname()
{...}public void setFirstname( String firstname ) {...}
public String getSurname()
{...}public void setSurname( String surname ) {...}
public String toString()
{ StringBuilder builder = new StringBuilder(); builder.append( firstname ); builder.append( ' ' ); builder.append( surname ); return builder.toString() }}
Strictly speaking this could be managed by the JSF Converter's 'getAsString' method, but I think it would be better in the Entity class?