Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-389

Property creation needs to update toString

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Done
    • Major
    • 1.0.0.Beta4, 1.0.0.CR1
    • None
    • None
    • None

    Description

      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?

      Attachments

        Activity

          People

            lincolnthree Lincoln Baxter III (Inactive)
            kennardconsulting Richard Kennard (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: