]
Lincoln Baxter III closed FORGE-389.
------------------------------------
Fix Version/s: 1.0.0.CR1
Resolution: Done
Improved / done.
Property creation needs to update toString
------------------------------------------
Key: FORGE-389
URL:
https://issues.jboss.org/browse/FORGE-389
Project: Forge
Issue Type: Feature Request
Reporter: Richard Kennard
Assignee: Lincoln Baxter III
Fix For: 1.0.0.CR1, 1.0.0.Beta4
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?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: