Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-1966

Plastic should throw an exception when it attempts to redefine an existing method unexpectedly

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.3.3
    • Fix Version/s: 5.4
    • Component/s: plastic
    • Labels:

      Description

      For example, we have page class; page shows "select" component on corresponsing page :

      public class FooPage {
      ...

      // now let's define Property "organizations"

      @Property
      private List<Organization> organizations;

      // we create method for getting SelectModel class for "select" component

      public SelectModel getOrganizations() {
      ... blablabla
      }

      ...
      }

      And on page:

      ...
      <t:select t:id="organization" model="getOrganizations" value="user.organization" encoder="getValueEncoder()"/>
      ...

      Ok. What's happen now? The behaivour of this situation is not defined. Tapestry can invoke "SelectModel getOrganizations()" or "List<Organization> getOrganizations()" in arbitrary order (it is clear why).

      It would be good, if Plastic throws an exception, when it redefines getter which already exists.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                andremoniy Andrei Arapov
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: