Tapestry 5
  1. Tapestry 5
  2. TAP5-1105

BeanModelSource should recognize public field as properties, but doesn't

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.2.0
    • Fix Version/s: 5.2.0
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      Recently, Tapestry's property expression language was modified to allow public fields to be treated like properties. However, using public fields in a bean with the BeanEditor does not work. This may require some changes to the PropertyAccess service.

        Activity

        Hide
        Howard M. Lewis Ship added a comment -

        As an added bonus, PropertyAccess and PropertyConduitSource will now have a proper understanding of generic types.

        Show
        Howard M. Lewis Ship added a comment - As an added bonus, PropertyAccess and PropertyConduitSource will now have a proper understanding of generic types.
        Hide
        Pierce Wetter added a comment -

        This causes an NPE in BeatModelSourceImpl:computeDepth:122 because Method is null.

        Object that triggered this error:

        public class EdenBase extends EdenGeneralBase
        {

        //~ Static fields/initializers -----------------------------------------------------------------

        /** Sonar pointed out that this was a magic number. Fair enough, made it a constant */
        public static final int DEFAULT_STRING_LENGTH = 255;

        /** UUIDs are always 36 chars long */
        public static final int UUID_LENGTH = 36;

        Code that caused the NPE:

        model=beanModelSource.createDisplayModel(EdenBase.class,messages);

        Show
        Pierce Wetter added a comment - This causes an NPE in BeatModelSourceImpl:computeDepth:122 because Method is null. Object that triggered this error: public class EdenBase extends EdenGeneralBase { //~ Static fields/initializers ----------------------------------------------------------------- /** Sonar pointed out that this was a magic number. Fair enough, made it a constant */ public static final int DEFAULT_STRING_LENGTH = 255; /** UUIDs are always 36 chars long */ public static final int UUID_LENGTH = 36; Code that caused the NPE: model=beanModelSource.createDisplayModel(EdenBase.class,messages);
        Hide
        Howard M. Lewis Ship added a comment -

        Skimped on the tests and see what happened!

        Show
        Howard M. Lewis Ship added a comment - Skimped on the tests and see what happened!

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Howard M. Lewis Ship
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development