Uploaded image for project: 'HAL'
  1. HAL
  2. HAL-1321

Better handling of required/nillable flags in HAL

XMLWordPrintable

      I think required attributes aren't handled optimally in MBUI forms.

      Server side attribute description provides three related flags:

      • required := attribute must be set, or an alternative must be set
      • alternatives := list of alternatives
      • nillable := !required || count(alternative-attributes) > 0

      Currently, attributes marked as required and having alternatives are treated as optional in HAL:

      • no asterisk (probably good),
      • placed into "Optional" group,
      • it is not enforced that the attribute or an alternative has to be set (on the server this is enforced).

      I suggest following behaviour instead:

      • still no asterisk (so a user doesn't get the feeling that he has to fill in both alternative attributes),
      • placed into "default" group (so that it's by default visible when creating a resource, and the eventual error message is immediately visible without having to open the "Optional" group when editing a resource),
      • it is enforced that a required attribute or its' alternative has to be set.

      cmiranda@redhat.com, hpehl@redhat.com what do you think?

              cmiranda@redhat.com Claudio Miranda
              thofman Tomas Hofman
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: