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

Resetting dependent choice

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • 1.9.0
    • Viewer Wicket
    • None

    Description

      As discussed on the Isis users list:
      ============================================

      Seems reasonable. Would you like to provide a pull request? [1]

      [1] http://isis.apache.org/contributors/contributing.html

      On 2 March 2015 at 16:20, Erik de Hair <e.dehair@pocos.nl> wrote:

      > Hi Dan,
      >
      >
      > On 03/02/2015 03:35 PM, Dan Haywood wrote:
      >
      >> Is there any use of setting the selected option to the first item of the
      >> choices? It seems a bit strange from the user's perspective.
      >>
      >>
      >> The rationale, IIRC, is that if the current value is not valid in the new
      >> set of choices — if(!curr.containedIn(choiceMementos)) — then we set
      >> the dependent choice to one of the valid set available as a convenience.
      >>
      >> I suppose, strictly speaking, that this should only be done if the
      >> dependent parameter is mandatory; otherwise a user might want to leave it
      >> as null.
      >>
      > I think, even when the parameter is mandatory, this should be handled by
      > validation. It would be even better to set it to null because the user is
      > forced to choose an option and would otherwise possibly submit a selected
      > value the user didn't want to set (and didn't see it changing).
      >
      >>
      >> I can reset it in my code but maybe this scenario isn't desirable for any
      >>> Isis application.
      >>>
      >>>
      >>> (Without trying it out for myself), I'm trying to think as to how you'd
      >> do
      >> that ... in the defaultNXxx() method, I am guessing?
      >>
      >> By copying the ReferencePanel-class to my app Just to try if it
      > works when setting it to null.
      >
      >>
      >> Cheers
      >> Dan
      >>
      >>

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            erikdehair Erik de Hair
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment