Includes in GSP

View: New views
5 Messages — Rating Filter:   Alert me  

Includes in GSP

by Denis Rodrigues Cassiano :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi!

I'm new in GRAILS and i need know how to use includes of gsp files as is it in JSP include tag. GRAILS have a similar approach?!

Thanks in advance!

--
**************************************
Denis Rodrigues Cassiano
www.deniscassiano.com
Jesus Cristo é o Senhor
**************************************

Re: Includes in GSP

by Marc Palmer Local :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 15 Sep 2006, at 10:33, Denis Rodrigues Cassiano wrote:

> Hi!
>
> I'm new in GRAILS and i need know how to use includes of gsp files  
> as is it
> in JSP include tag. GRAILS have a similar approach?!
>
> Thanks in advance!

The g:render tag is what you want:

http://grails.org/Tag+-+render

Note the bit right at the bottom of the page indicating that the view  
file must start with "_" but in the tag you don't include the "_".

Cheers
~ ~ ~
Marc Palmer (marc@...)
AnyWare Ltd. - Consultant

Authorized JIRA reseller, support and solutions provider

http://www.anyware.co.uk/


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


Re: Includes in GSP

by Sigmund :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Too bad it doesn't work in the sitemesh layout. I get:

...
<g:render template="navigation" />
...

java.io.FileNotFoundException: grails-app/views/grails-app/views/_navigation.gsp (No such file or directory)

Or am I missing something?

/S
Marc Palmer Local wrote:
On 15 Sep 2006, at 10:33, Denis Rodrigues Cassiano wrote:

> Hi!
>
> I'm new in GRAILS and i need know how to use includes of gsp files  
> as is it
> in JSP include tag. GRAILS have a similar approach?!
>
> Thanks in advance!

The g:render tag is what you want:

http://grails.org/Tag+-+render

Note the bit right at the bottom of the page indicating that the view  
file must start with "_" but in the tag you don't include the "_".

Cheers
~ ~ ~
Marc Palmer (marc@anyware.co.uk)
AnyWare Ltd. - Consultant

Authorized JIRA reseller, support and solutions provider

http://www.anyware.co.uk/


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Re: Includes in GSP

by Sigmund :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Obviously writing this helped :-)

<g:render template="layouts/navigation" /> works

/S



Too bad it doesn't work in the sitemesh layout. I get:

...
<g:render template="navigation" />
...

java.io.FileNotFoundException: grails-app/views/grails-app/views/_navigation.gsp (No such file or directory)

Or am I missing something?

/S
Marc Palmer Local wrote:
On 15 Sep 2006, at 10:33, Denis Rodrigues Cassiano wrote:

> Hi!
>
> I'm new in GRAILS and i need know how to use includes of gsp files  
> as is it
> in JSP include tag. GRAILS have a similar approach?!
>
> Thanks in advance!

The g:render tag is what you want:

http://grails.org/Tag+-+render

Note the bit right at the bottom of the page indicating that the view  
file must start with "_" but in the tag you don't include the "_".

Cheers
~ ~ ~
Marc Palmer (marc@anyware.co.uk)
AnyWare Ltd. - Consultant

Authorized JIRA reseller, support and solutions provider

http://www.anyware.co.uk/


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


Re: Includes in GSP

by Daniel Honig :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

rename your template to follow the convention for grails templates _mytemplate.gsp
and you'll be back on track

On Sat, Nov 7, 2009 at 3:51 PM, Sigmund <sigmund.lundgren@...> wrote:

Too bad it doesn't work in the sitemesh layout. I get:

...
<g:render template="navigation" />
...

java.io.FileNotFoundException:
grails-app/views/grails-app/views/_navigation.gsp (No such file or
directory)

Or am I missing something?

/S

Marc Palmer Local wrote:
>
>
> On 15 Sep 2006, at 10:33, Denis Rodrigues Cassiano wrote:
>
>> Hi!
>>
>> I'm new in GRAILS and i need know how to use includes of gsp files
>> as is it
>> in JSP include tag. GRAILS have a similar approach?!
>>
>> Thanks in advance!
>
> The g:render tag is what you want:
>
> http://grails.org/Tag+-+render
>
> Note the bit right at the bottom of the page indicating that the view
> file must start with "_" but in the tag you don't include the "_".
>
> Cheers
> ~ ~ ~
> Marc Palmer (marc@...)
> AnyWare Ltd. - Consultant
>
> Authorized JIRA reseller, support and solutions provider
>
> http://www.anyware.co.uk/
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>
>

--
View this message in context: http://old.nabble.com/Includes-in-GSP-tp6322146p26248436.html
Sent from the grails - user mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email