Uploaded image for project: 'Causeway'
  1. Causeway
  2. CAUSEWAY-1311

Mixins for Persistable metadata causes exception when rendering.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.11.1
    • 1.12.0
    • Core
    • None

    Description

      one (or both) of these causes issue (this in the github.com/incodehq/contactapp)

      @Mixin
      public class Persistable_id {
      
          private final Persistable persistable;
      
          public Persistable_id(Persistable persistable) {
              this.persistable = persistable;
          }
      
          @MemberOrder(name = "Metadata", sequence = "1")
          @Action(semantics = SemanticsOf.SAFE)
          @ActionLayout(contributed = Contributed.AS_ASSOCIATION)
          @PropertyLayout()
          public Object $$() {
              final Object objectId = JDOHelper.getObjectId(persistable);
              if(objectId instanceof DatastoreId) {
                  final DatastoreId datastoreId = (DatastoreId) objectId;
                  return datastoreId.getKeyAsObject();
              }
              return null;
          }
      
          public boolean hide$$() {
              return $$() == null;
          }
      
      
      }
      

      and/or

      @Mixin .. 
      public class Persistable_version {
      
          private final Persistable persistable;
      
          public Persistable_version(Persistable persistable) {
              this.persistable = persistable;
          }
      
          @MemberOrder(name = "Metadata", sequence = "2")
          @Action(semantics = SemanticsOf.SAFE)
          @ActionLayout(contributed = Contributed.AS_ASSOCIATION)
          @PropertyLayout()
          public Object $$() {
              return JDOHelper.getVersion(persistable);
          }
          public boolean hide$$() {
              return $$() == null;
          }
      
      }
      

      Attachments

        Activity

          People

            danhaywood Daniel Keir Haywood
            danhaywood Daniel Keir Haywood
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: