Grails
  1. Grails
  2. GRAILS-7479

Rename params.action in the Controllers

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Won't Fix
    • Affects Version/s: 1.3.7
    • Fix Version/s: None
    • Component/s: Controllers
    • Environment:

      Description

      action param clash with domain field action. I have created a domain and one of its fields was action. So when I tried to save my form (scaffolded) I got the following validation message: Property [action] of class [class myproject.Registration] with value [save] is not contained within the list [[Yes, No]]. Note that grails is confused about what action it should validate against.

        Activity

        Hide
        Burt Beckwith added a comment -

        A lot of code (internal Grails as well as plugins and existing applications) depends on the name 'action'.

        Show
        Burt Beckwith added a comment - A lot of code (internal Grails as well as plugins and existing applications) depends on the name 'action'.
        Hide
        George Anderson Guimarães added a comment -

        Could you then request a documentation update to tell users about this "feature" upfront?

        Show
        George Anderson Guimarães added a comment - Could you then request a documentation update to tell users about this "feature" upfront?
        Hide
        Thomas Bruyelle added a comment -

        Same problem occurs when parseRequest is enabled and the json body contains an element called action. If no action is planned on dev side, maybe `action` should be added to the reserved words list.

        Show
        Thomas Bruyelle added a comment - Same problem occurs when parseRequest is enabled and the json body contains an element called action . If no action is planned on dev side, maybe `action` should be added to the reserved words list.
        Hide
        George Anderson Guimarães added a comment -

        Agreed to add in the reserved word list.

        Show
        George Anderson Guimarães added a comment - Agreed to add in the reserved word list.

          People

          • Assignee:
            Unassigned
            Reporter:
            George Anderson Guimarães
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development