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

[WON'T FIX] For hard-coded methods such as title(), iconName(), and cssClass(), hidden(), disabled(), validate(), provide an alternative mechanism to specify such methods.

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • core-1.7.0
    • 2.0.0-M5
    • None

    Description

      The methods involved are:

      • title()
      • iconName()
      • cssClass() (introduced in ISIS-1000)

      and the (probably to be deprecated) callback methods:

      • loaded()
      • saving()/persisting()
      • saved()/persisted()
      • updating()
      • updated()
      • removing()/deleting()
      • deleted()/deleted()

      In all cases, if the method is annotated with @Action (ISIS-990) or with @Programmatic then it no facet should be installed (that is, action takes precedence).

      Also, if there is a clashing action, then an annotation should indicate the method (analogous to junit's @Test annotation). Since these are all hook methods for Isis to call, I suggest the annotation is called @Hook, eg:

      @Hook(HookType.TITLE)
      String someOtherMethodActingLikeTitle() { ... }
      
      @Hook(HookType.ICON_NAME)
      String someMethodActingLikeIconName() {  .... }
      
      @Hook(HookType.CSS_CLASS)
      String someMethodActingLikeCssClass() { ... }
      

      If an annotation doesn't appeal, we could instead define a special prefix, eg "__isis_xxx" (cf JUnit3's testXxx). For example:

      
      

      String __isis_title()

      { ... }
      String __isis_iconName() { ... }

      String __isis_cssClass()

      { ... }

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: