Uploaded image for project: 'Isis'
  1. Isis
  2. ISIS-1311

Mixins for Persistable metadata causes exception when rendering.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.11.1
    • Fix Version/s: 1.12.0
    • Component/s: Core
    • Labels:
      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

            • Assignee:
              danhaywood Dan Haywood
              Reporter:
              danhaywood Dan Haywood
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: