Grails

Regression: pageScope.variables in tags is empty

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Fixed
  • Affects Version/s: 2.0-M2
  • Fix Version/s: 2.0-RC1
  • Component/s: None
  • Labels:
    None
  • Testcase included:
    yes

Description

Bean-fields and hence any plugin/app that depend on it are broken by this problem.

Previously in Grails, pageScope.variables[x] would return values from the model. In 2.0m2 this is broken. The GroovyPageBinding that pageScope is, contains nothing except and empty "flash" by default.

See attached test project. Just run and browse to /

Issue Links

Activity

Hide
Lari Hotari added a comment - - edited

This is caused by the optimizations I made to GroovyPageBinding. The optimizations doubled the performance of the jtdev performance test.

Would it be possible make a change in bean-fields and use "pageScope.getVariable(x)" instead of "pageScope.variables[x]" ?

Show
Lari Hotari added a comment - - edited This is caused by the optimizations I made to GroovyPageBinding. The optimizations doubled the performance of the jtdev performance test. Would it be possible make a change in bean-fields and use "pageScope.getVariable(x)" instead of "pageScope.variables[x]" ?
Hide
Graeme Rocher added a comment -

This is a pretty major regression and may break others things. Is there no way to make variables[x] work lazily?

Show
Graeme Rocher added a comment - This is a pretty major regression and may break others things. Is there no way to make variables[x] work lazily?
Hide
Lari Hotari added a comment -

I solved this problem by implementing java.util.Map . variables[x] will call getVariable(x) under the covers.

Show
Lari Hotari added a comment - I solved this problem by implementing java.util.Map . variables[x] will call getVariable(x) under the covers.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: