Version 0.4.2

To be released…​ this version should come with some nice changes (breaking some old code sometime)

  • Improve DSL hierarchy

    • hidden fields on top only for readability

    • no redundant parameter passing in form

    • no redundant parameter passing in filter

    • filterField only under section only

    • form top level field only on header

  • hook for form fields to display M2M nicely

  • hook to register typical object filter

  • Improve restore state

  • Fix table grouping / trees with paginate

  • TBD

Version 0.4.1

Updated Menus layout

screenshot news menu 0.4.1

Menus layout code
private UiMenuSpecifier buildMenu(String q = null) {
    new UiMenuSpecifier().ui {
        menu CrewController.&index as MC
        menu CrewController.&listRoles as MC
        menu CrewController.&hierarchy as MC
        menuIcon ActionIcon.CONFIG_USER, this.&editUser as MC
        menuIcon ActionIcon.EXPORT_PDF, this.&downloadBinPdf as MC
        menuSearch this.&search as MethodClosure, q
        menuOptions(SupportedLanguage.fromContext())            (1)
    }
}
  1. Language choice is on the right of the searchbar, and other enums can be added

Kotlin JS Debug HowTo
$ cd infra/browser/client                             (1)
$ ./gradlew browserDevelopmentRun                     (2)
$ vi intranet/server/grails-app/conf/application.yml  (3)
# Uncomment line bellow
# client.js.path: 'http://localhost:8080/client.js'

# Then your browser should show Kotlin code !
  1. Move to client folder where JS code is generated

  2. Launch a server serving client.js and client.js.map …​

  3. edit your intranet application.yml file

New Solr DSL Simplification (no more labeling needed)
@PostConstruct
private void init() {
    taackSearchService.registerSolrSpecifier(this,
            new SolrSpecifier(User,
                CrewController.&showUserFromSearch as MethodClosure,
                this.&labeling as MethodClosure, { User u ->
        u ?= new User()
        indexField SolrFieldType.TXT_NO_ACCENT, u.username_
        indexField SolrFieldType.TXT_GENERAL, u.username_
        indexField SolrFieldType.TXT_NO_ACCENT, u.firstName_
        indexField SolrFieldType.TXT_NO_ACCENT, u.lastName_
        indexField SolrFieldType.POINT_STRING, "mainSubsidiary", true, u.subsidiary?.toString()
        indexField SolrFieldType.POINT_STRING, "businessUnit", true, u.businessUnit?.toString()
        indexField SolrFieldType.DATE, 0.5f, true, u.dateCreated_
        indexField SolrFieldType.POINT_STRING, "userCreated", 0.5f, true, u.userCreated?.username
    }))
}

Version 0.4.0

  • No more paginate in tables. See New iterate usage

  • No list, but an iterate taking a closure as parameter, with a builder pattern approach to pass args

  • Menu are auto labeled now (use lang=test in url to translate menus). See New menu code

  • No more isAjax parameter in tables …​ See New rowAction code

  • change rowLink into rowAction [i18n_isAjax]

  • No label needed on rowAction in tables. See New rowAction code

  • No more ajaxBlock required for tables, forms, tableFilters

  • formAction has no more isAjax parameter

  • formAction has no more mandatory i18n parameter

  • form has no more mandatory i18n parameter, i18n is based on current action name

  • block action has no more mandatory i18n parameter, i18n is based on target action

  • block action has no more mandatory isAjax parameter

New iterate usage
iterate(taackFilterService.getBuilder(Role)                     (1)
        .setMaxNumberOfLine(20)                                 (2)
        .setSortOrder(TaackFilter.Order.DESC, u.authority_)     (3)
        .build()) { Role r, Long counter ->
            row {
                rowColumn {
                    rowField r.authority
                    if (hasSelect)
                        rowAction
                            ActionIcon.SELECT * IconStyle.SCALE_DOWN,
                            CrewController.&selectRole as MC
                            r.id                                (4)
                }
            }
        }
  1. iterate

  2. Specifying max is enough to trigger paginate if more lines

  3. Replace the old inefficient pattern to describe initial sort and order

  4. No more i18n and isAjax parameter

New menu code
private UiMenuSpecifier buildMenu(String q = null) {
    UiMenuSpecifier m = new UiMenuSpecifier()
    m.ui {
        menu CrewController.&index as MC        (1)
        menu CrewController.&listRoles as MC
        menu CrewController.&hierarchy as MC
        menuSearch this.&search as MethodClosure, q
    }
    m
}
  1. No i18n parameter

New rowAction code
if (hasActions) {
    rowColumn {
        rowAction ActionIcon.EDIT * IconStyle.SCALE_DOWN, this.&roleForm as MC, r.id (1)
    }
}
  1. No i18n parameter, no last isAjax parameter

Version 0.3.9

No updates since too long, hibernation is coming to an end. This version offer:

  • Grails 6.2.0

  • Groovy 3.0.21

  • Bumping Various deps …​ (See Changelog)