Grails

org.codehaus.groovy.grails.web.sitemesh.GSPSitemeshPage.addProperty() not backwards compatible with Grails 1.1.x or 1.0.x

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.2 final
  • Fix Version/s: 1.2.1
  • Component/s: View technologies
  • Labels:
    None
  • Environment:
    Windows XP and Mac OS 10.6.2, Grails 1.2
  • Patch Submitted:
    Yes

Description

In the views for my applications, I take advantage of the <meta /> property setting furnished by Sitemesh.

I used to be able to do

<meta name="propertyName" value="${valueArg}"></meta>

in which <valueArg> could be of any type (e.g., a String or Timestamp).

Now, not only is an exception thrown when attempting to create a meta property of any type other than String (or GStringImpl, I suppose) (GrailsExceptionResolver), attempting to read a previously undefined property also triggers the exception (presumably because the in-view method pageProperty() creates a default, empty property when none existed prior).

"Previously undefined" means that I'm trying to use a meta property in a layout when that property was not initialized in a view partial.

Issue Links

Activity

Hide
Jeff Brown added a comment -

Aaron,

Could you please attach a small simple project that demonstrates the behavior you are seeing?

Show
Jeff Brown added a comment - Aaron, Could you please attach a small simple project that demonstrates the behavior you are seeing?
Hide
Lari Hotari added a comment -

I added a test for this too: http://github.com/grails/grails/commit/4079b898924563e00f908d3f428f8b810b6385b6 .
btw. the meta tag uses the content attribute for the value, not "value".
example:

<html>
	<head>
		<meta name="intval" content="${123}"/>
		<meta name="dateval" content="${new Date(0)}"/>
		<title>This is the title</title>
	</head>
	<body onload="somejs();">body here</body>
</html>
Show
Lari Hotari added a comment - I added a test for this too: http://github.com/grails/grails/commit/4079b898924563e00f908d3f428f8b810b6385b6 . btw. the meta tag uses the content attribute for the value, not "value". example:
<html>
	<head>
		<meta name="intval" content="${123}"/>
		<meta name="dateval" content="${new Date(0)}"/>
		<title>This is the title</title>
	</head>
	<body onload="somejs();">body here</body>
</html>

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: