Grails
  1. Grails
  2. GRAILS-4002

Obtain the whole model passed to the view in the view (with patch)

    Details

    • Type: Improvement Improvement
    • Status: Reopened
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.1-beta3
    • Fix Version/s: None
    • Component/s: View technologies
    • Labels:
      None
    • Patch Submitted:
      Yes

      Description

      This issue duplicates GRAILS-2807, but as I now made a patch, this will show up as "Patch included". Would be great if this could be applied (and a bit reviewed) to 1.1-rc1.

      1. 2807-patch.diff
        3 kB
        Jean-Noël Rivasseau
      2. sample-4002.tar.bz2
        143 kB
        Jean-Noël Rivasseau

        Activity

        Hide
        Graeme Rocher added a comment -

        Thanks for the patch. I modified copyBinding to do:

        binding.getVariables().putAll(oldBinding.getVariables());
        

        Because it seemed more efficient to me.

        Show
        Graeme Rocher added a comment - Thanks for the patch. I modified copyBinding to do: binding.getVariables().putAll(oldBinding.getVariables()); Because it seemed more efficient to me.
        Hide
        Graeme Rocher added a comment -

        Had to revert since it causes a regression where the errors view rendered a blank page

        Show
        Graeme Rocher added a comment - Had to revert since it causes a regression where the errors view rendered a blank page
        Hide
        Jean-Noël Rivasseau added a comment -

        Damn. Do you think you can fix it for 1.1?

        Show
        Jean-Noël Rivasseau added a comment - Damn. Do you think you can fix it for 1.1?
        Hide
        Graeme Rocher added a comment -

        Maybe if you post an example that shows what the actual issue is then we can try and come up with a suitable solution.

        Show
        Graeme Rocher added a comment - Maybe if you post an example that shows what the actual issue is then we can try and come up with a suitable solution.
        Hide
        Jean-Noël Rivasseau added a comment -

        I uploaded a sample application that reproduces, just go to main/something.

        It fails because we use g.render in a controller, then again use g.render in the template. It won't use the model for pageScope then (it works with views).

        My patch corrected that. If you can tell me what it causes to fail right now, I can maybe put a bit of work into this

        Thanks

        Show
        Jean-Noël Rivasseau added a comment - I uploaded a sample application that reproduces, just go to main/something. It fails because we use g.render in a controller, then again use g.render in the template. It won't use the model for pageScope then (it works with views). My patch corrected that. If you can tell me what it causes to fail right now, I can maybe put a bit of work into this Thanks

          People

          • Assignee:
            Unassigned
            Reporter:
            Jean-Noël Rivasseau
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Last Reviewed:

              Development