Skip to content
This repository has been archived by the owner on Sep 7, 2024. It is now read-only.

Commit

Permalink
Refine RenderTagLib
Browse files Browse the repository at this point in the history
  • Loading branch information
rainboyan committed Feb 12, 2023
1 parent cdb7340 commit 24976b5
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2004-2022 the original author or authors.
* Copyright 2004-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -138,7 +138,7 @@ class RenderTagLib implements RequestConstants, TagLibrary, GrailsApplicationAwa
content = bodyClosure()
}
if (content instanceof StreamCharBuffer) {
gspSiteMeshPage.setPageBuffer(content)
gspSiteMeshPage.setPageBuffer((StreamCharBuffer) content)
gspSiteMeshPage.setUsed(isSitemeshPreprocessMode())
}
else if (content != null) {
Expand Down Expand Up @@ -250,7 +250,7 @@ class RenderTagLib implements RequestConstants, TagLibrary, GrailsApplicationAwa

String propertyName = attrs.name as String
def htmlPage = getPage()
def propertyValue
def propertyValue = null

if (htmlPage instanceof GSPSitemeshPage) {
// check if there is an component content buffer
Expand Down Expand Up @@ -305,7 +305,7 @@ class RenderTagLib implements RequestConstants, TagLibrary, GrailsApplicationAwa
def propertyValue = null
if (htmlPage instanceof GSPSitemeshPage) {
// check if there is an component content buffer
propertyValue = htmlPage.getContentBuffer(propertyName)
propertyValue = ((GSPSitemeshPage) htmlPage).getContentBuffer(propertyName)
}

if (!propertyValue) {
Expand Down

0 comments on commit 24976b5

Please sign in to comment.