Quantcast

g:include broken in 2.0.1 !

classic Classic list List threaded Threaded
2 messages Options
SN
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

g:include broken in 2.0.1 !

SN

layouts are being applied to include requests, causing the calling views to break.


list.gsp

<!doctype html>
<html>
    <head>
        <meta name="layout" content="main">
        <title><g:message code="default.list.label" args="[entityName]" /></title>      
    </head>
    <body>
                 ..............
                 .............
                <g:include controller="AnotherController" action="list"/>
    </body>
</html>

it would break, because AnotherController's list.gsp would have layout applied as well, causing the <html>,<body> and other tags appear twice in the response - 

Is this expected or known behavior ! or should I raise a jira.. 
   
Sudhir 
 
SN
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: g:include broken in 2.0.1 !

SN
Yes, It's broken - if g:applyLayout has been used.


A bug report has been attached - that has a working example
 
   
Sudhir 
 


From: "[hidden email]" <[hidden email]>
To: Grails-user <[hidden email]>
Sent: Saturday, 7 April 2012 3:21 PM
Subject: [grails-user] g:include broken in 2.0.1 !


layouts are being applied to include requests, causing the calling views to break.


list.gsp

<!doctype html>
<html>
    <head>
        <meta name="layout" content="main">
        <title><g:message code="default.list.label" args="[entityName]" /></title>      
    </head>
    <body>
                 ..............
                 .............
                <g:include controller="AnotherController" action="list"/>
    </body>
</html>

it would break, because AnotherController's list.gsp would have layout applied as well, causing the <html>,<body> and other tags appear twice in the response - 

Is this expected or known behavior ! or should I raise a jira.. 
   
Sudhir 
 


Loading...