Skip to content

Commit 4c425ad

Browse files
committed
fix: sitemesh3 rendering
1 parent 388387c commit 4c425ad

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

grails-gsp/grails-sitemesh3/src/main/groovy/org/grails/plugins/web/taglib/RenderSitemeshTagLib.groovy

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ import grails.gsp.TagLib
3333

3434
import java.nio.CharBuffer
3535

36+
/**
37+
* The tags in this library are rendered by sitemesh itself instead of the grails tags so they should always be written
38+
* as a 'sitemesh' namespace.
39+
*/
3640
@TagLib
3741
class RenderSitemeshTagLib implements TagLibrary {
3842

grails-gsp/grails-sitemesh3/src/main/groovy/org/grails/plugins/web/taglib/SitemeshTagLib.groovy

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ import grails.gsp.TagLib
2828

2929
@TagLib
3030
class SitemeshTagLib implements TagLibrary {
31-
static String namespace = 'sitemesh'
31+
static String namespace = 'grailsLayout'
3232
CodecLookup codecLookup
33-
// from org.grails.gsp.compiler.SitemeshPreprocessor
34-
public static final String XML_CLOSING_FOR_EMPTY_TAG_ATTRIBUTE_NAME = "gsp_sm_xmlClosingForEmptyTag";
33+
// from org.grails.gsp.compiler.GrailsLayoutPreprocessor
34+
public static final String XML_CLOSING_FOR_EMPTY_TAG_ATTRIBUTE_NAME = "gsp_sm_xmlClosingForEmptyTag"
3535

3636
SitemeshTagLib(CodecLookup codecLookup) {
3737
this.codecLookup = codecLookup
@@ -97,9 +97,9 @@ class SitemeshTagLib implements TagLibrary {
9797
content
9898
}
9999

100-
// Grails org.grails.gsp.compiler.SitemeshPreprocessor replaces
101-
// <content /> tags with <sitemesh:captureContent /> tags. This just changes them back.
102-
// Alternatively, a 'sitemesh:captureContent' ContentBlockExtractingRule can be used.
100+
// Grails org.grails.gsp.compiler.GrailsLayoutPreprocessor replaces
101+
// <content /> tags with <grailsLayout:captureContent /> tags. This just changes them back.
102+
// Alternatively, a 'grailsLayout:captureContent' ContentBlockExtractingRule can be used.
103103
// See: GrailsTagRuleBundle
104104
Closure captureContent = { attrs, body ->
105105
StringBuilder tag = new StringBuilder('<content ')
@@ -119,7 +119,7 @@ class SitemeshTagLib implements TagLibrary {
119119
/**
120120
* Allows passing of parameters to Sitemesh layout.<br/>
121121
*
122-
* &lt;sitemesh:parameter name="foo" value="bar" /&gt;
122+
* &lt;grailsLayout:parameter name="foo" value="bar" /&gt;
123123
*/
124124
Closure parameter = { Map attrs, body ->
125125
captureTagContent(out, 'parameter', attrs, body)

grails-test-examples/gsp-sitemesh3/src/integration-test/groovy/EndToEndSpec.groovy

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import spock.lang.PendingFeature
2424
@Integration
2525
class EndToEndSpec extends ContainerGebSpec {
2626

27-
@PendingFeature
2827
def 'simple layout'() {
2928
when:
3029
go('endToEnd/simpleLayout')
@@ -35,7 +34,6 @@ class EndToEndSpec extends ContainerGebSpec {
3534
</body></html>"""
3635
}
3736

38-
@PendingFeature
3937
def 'title in subtemplate'() {
4038
when:
4139
go('endToEnd/titleInSubtemplate')
@@ -58,7 +56,6 @@ class EndToEndSpec extends ContainerGebSpec {
5856
</body></html>"""
5957
}
6058

61-
@PendingFeature
6259
def 'parameters'() {
6360
when:
6461
go('endToEnd/parameters')
@@ -67,7 +64,6 @@ class EndToEndSpec extends ContainerGebSpec {
6764
pageSource == """<html><head></head><body><h1>pageProperty: here!</h1></body></html>"""
6865
}
6966

70-
@PendingFeature
7167
def 'parameters with logic'() {
7268
when:
7369
go('endToEnd/parametersWithLogic')
@@ -76,7 +72,6 @@ class EndToEndSpec extends ContainerGebSpec {
7672
pageSource == "<html><head></head><body>good</body></html>"
7773
}
7874

79-
@PendingFeature
8075
def 'multiline title'() {
8176
when:
8277
go('endToEnd/multilineTitle')

0 commit comments

Comments
 (0)