You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tiles.apache.org by "Amin Mohammed-Coleman (JIRA)" <ji...@apache.org> on 2009/04/03 08:50:06 UTC

[jira] Created: (TILES-391) Put Attribute tag does not seem to work with Freemarker

Put Attribute tag does not seem to work with Freemarker
-------------------------------------------------------

                 Key: TILES-391
                 URL: https://issues.apache.org/struts/browse/TILES-391
             Project: Tiles
          Issue Type: Bug
          Components: tiles-core, tiles-freemarker
    Affects Versions: 2.1.2
         Environment: Mac OS
Eclipse 3.4
Tomcat 6.0.16
            Reporter: Amin Mohammed-Coleman


When using jsp freemarker support the put-attribute fails to put an object into the page cope.  For example:

tile A:

<@tiles.insertDefinition name="put.attribute.tile">
	<@tiles.putAttribute name=personalContact value=pcobj />
</...@tiles.insertDefinition>

tile put.attribute.tile:

<#assign tiles=JspTaglibs["http://tiles.apache.org/tags-tiles"] />

<@tiles.importAttribute/>

EMAIL : ${personalContact.email} <br/>
FIRST NAME: ${personalContact.firstName} <br/>
LAST NAME: ${personalContact.lastName} <br/>

Produces a freemaker exception that the personContact is undefined.  

Please refer to mailing list: 

http://mail-archives.apache.org/mod_mbox/tiles-users/200904.mbox/%3caae96ca0904011317q202a3b6eib9d334ef880fb058@mail.gmail.com%3e



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (TILES-391) Put Attribute tag does not seem to work with Freemarker

Posted by "Antonio Petrelli (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/TILES-391?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Antonio Petrelli closed TILES-391.
----------------------------------

    Resolution: Not A Problem

This was not a bug, so I close it as "not a problem".

> Put Attribute tag does not seem to work with Freemarker
> -------------------------------------------------------
>
>                 Key: TILES-391
>                 URL: https://issues.apache.org/struts/browse/TILES-391
>             Project: Tiles
>          Issue Type: Bug
>          Components: tiles-core, tiles-freemarker
>    Affects Versions: 2.1.2
>         Environment: Mac OS
> Eclipse 3.4
> Tomcat 6.0.16
>            Reporter: Amin Mohammed-Coleman
>         Attachments: tiles.zip, tiles.zip
>
>
> When using jsp freemarker support the put-attribute fails to put an object into the page cope.  For example:
> tile A:
> <@tiles.insertDefinition name="put.attribute.tile">
> 	<@tiles.putAttribute name=personalContact value=pcobj />
> </...@tiles.insertDefinition>
> tile put.attribute.tile:
> <#assign tiles=JspTaglibs["http://tiles.apache.org/tags-tiles"] />
> <@tiles.importAttribute/>
> EMAIL : ${personalContact.email} <br/>
> FIRST NAME: ${personalContact.firstName} <br/>
> LAST NAME: ${personalContact.lastName} <br/>
> Produces a freemaker exception that the personContact is undefined.  
> Please refer to mailing list: 
> http://mail-archives.apache.org/mod_mbox/tiles-users/200904.mbox/%3caae96ca0904011317q202a3b6eib9d334ef880fb058@mail.gmail.com%3e

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TILES-391) Put Attribute tag does not seem to work with Freemarker

Posted by "Amin Mohammed-Coleman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/TILES-391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45844#action_45844 ] 

Amin Mohammed-Coleman commented on TILES-391:
---------------------------------------------

Hi 

Just one thing, is it possible to get the cascade=true added to the documentation. I had a look at the taglib reference and there is no mention of this.  I'm not sure whether  this attribute needs to be used when using freemarker and tiles.

Cheers



> Put Attribute tag does not seem to work with Freemarker
> -------------------------------------------------------
>
>                 Key: TILES-391
>                 URL: https://issues.apache.org/struts/browse/TILES-391
>             Project: Tiles
>          Issue Type: Bug
>          Components: tiles-core, tiles-freemarker
>    Affects Versions: 2.1.2
>         Environment: Mac OS
> Eclipse 3.4
> Tomcat 6.0.16
>            Reporter: Amin Mohammed-Coleman
>         Attachments: tiles.zip, tiles.zip
>
>
> When using jsp freemarker support the put-attribute fails to put an object into the page cope.  For example:
> tile A:
> <@tiles.insertDefinition name="put.attribute.tile">
> 	<@tiles.putAttribute name=personalContact value=pcobj />
> </...@tiles.insertDefinition>
> tile put.attribute.tile:
> <#assign tiles=JspTaglibs["http://tiles.apache.org/tags-tiles"] />
> <@tiles.importAttribute/>
> EMAIL : ${personalContact.email} <br/>
> FIRST NAME: ${personalContact.firstName} <br/>
> LAST NAME: ${personalContact.lastName} <br/>
> Produces a freemaker exception that the personContact is undefined.  
> Please refer to mailing list: 
> http://mail-archives.apache.org/mod_mbox/tiles-users/200904.mbox/%3caae96ca0904011317q202a3b6eib9d334ef880fb058@mail.gmail.com%3e

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TILES-391) Put Attribute tag does not seem to work with Freemarker

Posted by "Amin Mohammed-Coleman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/TILES-391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45839#action_45839 ] 

Amin Mohammed-Coleman commented on TILES-391:
---------------------------------------------

Using the following versions of tiles:

2.1.2 core
2.12 jsp
2.1.2 servlet

spring version 2.5.5

> Put Attribute tag does not seem to work with Freemarker
> -------------------------------------------------------
>
>                 Key: TILES-391
>                 URL: https://issues.apache.org/struts/browse/TILES-391
>             Project: Tiles
>          Issue Type: Bug
>          Components: tiles-core, tiles-freemarker
>    Affects Versions: 2.1.2
>         Environment: Mac OS
> Eclipse 3.4
> Tomcat 6.0.16
>            Reporter: Amin Mohammed-Coleman
>         Attachments: tiles.zip
>
>
> When using jsp freemarker support the put-attribute fails to put an object into the page cope.  For example:
> tile A:
> <@tiles.insertDefinition name="put.attribute.tile">
> 	<@tiles.putAttribute name=personalContact value=pcobj />
> </...@tiles.insertDefinition>
> tile put.attribute.tile:
> <#assign tiles=JspTaglibs["http://tiles.apache.org/tags-tiles"] />
> <@tiles.importAttribute/>
> EMAIL : ${personalContact.email} <br/>
> FIRST NAME: ${personalContact.firstName} <br/>
> LAST NAME: ${personalContact.lastName} <br/>
> Produces a freemaker exception that the personContact is undefined.  
> Please refer to mailing list: 
> http://mail-archives.apache.org/mod_mbox/tiles-users/200904.mbox/%3caae96ca0904011317q202a3b6eib9d334ef880fb058@mail.gmail.com%3e

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TILES-391) Put Attribute tag does not seem to work with Freemarker

Posted by "Amin Mohammed-Coleman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/TILES-391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45843#action_45843 ] 

Amin Mohammed-Coleman commented on TILES-391:
---------------------------------------------

Hi

Yeah sorry about the first mistake (user error!) and the second fix did the job.  Thanks, I'm glad it was something that it was something I was doing rather than an issue with the library.  


Cheers
Amin

> Put Attribute tag does not seem to work with Freemarker
> -------------------------------------------------------
>
>                 Key: TILES-391
>                 URL: https://issues.apache.org/struts/browse/TILES-391
>             Project: Tiles
>          Issue Type: Bug
>          Components: tiles-core, tiles-freemarker
>    Affects Versions: 2.1.2
>         Environment: Mac OS
> Eclipse 3.4
> Tomcat 6.0.16
>            Reporter: Amin Mohammed-Coleman
>         Attachments: tiles.zip, tiles.zip
>
>
> When using jsp freemarker support the put-attribute fails to put an object into the page cope.  For example:
> tile A:
> <@tiles.insertDefinition name="put.attribute.tile">
> 	<@tiles.putAttribute name=personalContact value=pcobj />
> </...@tiles.insertDefinition>
> tile put.attribute.tile:
> <#assign tiles=JspTaglibs["http://tiles.apache.org/tags-tiles"] />
> <@tiles.importAttribute/>
> EMAIL : ${personalContact.email} <br/>
> FIRST NAME: ${personalContact.firstName} <br/>
> LAST NAME: ${personalContact.lastName} <br/>
> Produces a freemaker exception that the personContact is undefined.  
> Please refer to mailing list: 
> http://mail-archives.apache.org/mod_mbox/tiles-users/200904.mbox/%3caae96ca0904011317q202a3b6eib9d334ef880fb058@mail.gmail.com%3e

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TILES-391) Put Attribute tag does not seem to work with Freemarker

Posted by "Antonio Petrelli (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/TILES-391?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Antonio Petrelli updated TILES-391:
-----------------------------------

    Attachment: tiles.zip

Attached the fixed version of your webapp.
There were two problems:
* in FreemarkerTilesController you were including "use.attribute.tile" instead of "put.attribute.tile", so the <@tiles.insertDefinition> was not called at all;
* I added a "cascade=true" attribute to <@tiles.putAttribute> because this attribute was needed at a lower level.

> Put Attribute tag does not seem to work with Freemarker
> -------------------------------------------------------
>
>                 Key: TILES-391
>                 URL: https://issues.apache.org/struts/browse/TILES-391
>             Project: Tiles
>          Issue Type: Bug
>          Components: tiles-core, tiles-freemarker
>    Affects Versions: 2.1.2
>         Environment: Mac OS
> Eclipse 3.4
> Tomcat 6.0.16
>            Reporter: Amin Mohammed-Coleman
>         Attachments: tiles.zip, tiles.zip
>
>
> When using jsp freemarker support the put-attribute fails to put an object into the page cope.  For example:
> tile A:
> <@tiles.insertDefinition name="put.attribute.tile">
> 	<@tiles.putAttribute name=personalContact value=pcobj />
> </...@tiles.insertDefinition>
> tile put.attribute.tile:
> <#assign tiles=JspTaglibs["http://tiles.apache.org/tags-tiles"] />
> <@tiles.importAttribute/>
> EMAIL : ${personalContact.email} <br/>
> FIRST NAME: ${personalContact.firstName} <br/>
> LAST NAME: ${personalContact.lastName} <br/>
> Produces a freemaker exception that the personContact is undefined.  
> Please refer to mailing list: 
> http://mail-archives.apache.org/mod_mbox/tiles-users/200904.mbox/%3caae96ca0904011317q202a3b6eib9d334ef880fb058@mail.gmail.com%3e

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TILES-391) Put Attribute tag does not seem to work with Freemarker

Posted by "Amin Mohammed-Coleman (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/TILES-391?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Amin Mohammed-Coleman updated TILES-391:
----------------------------------------

    Attachment: tiles.zip

Attached maven file.

Use the following url to get the exception:

http://localhost:8080/tiles/freemarkerTiles.htm


> Put Attribute tag does not seem to work with Freemarker
> -------------------------------------------------------
>
>                 Key: TILES-391
>                 URL: https://issues.apache.org/struts/browse/TILES-391
>             Project: Tiles
>          Issue Type: Bug
>          Components: tiles-core, tiles-freemarker
>    Affects Versions: 2.1.2
>         Environment: Mac OS
> Eclipse 3.4
> Tomcat 6.0.16
>            Reporter: Amin Mohammed-Coleman
>         Attachments: tiles.zip
>
>
> When using jsp freemarker support the put-attribute fails to put an object into the page cope.  For example:
> tile A:
> <@tiles.insertDefinition name="put.attribute.tile">
> 	<@tiles.putAttribute name=personalContact value=pcobj />
> </...@tiles.insertDefinition>
> tile put.attribute.tile:
> <#assign tiles=JspTaglibs["http://tiles.apache.org/tags-tiles"] />
> <@tiles.importAttribute/>
> EMAIL : ${personalContact.email} <br/>
> FIRST NAME: ${personalContact.firstName} <br/>
> LAST NAME: ${personalContact.lastName} <br/>
> Produces a freemaker exception that the personContact is undefined.  
> Please refer to mailing list: 
> http://mail-archives.apache.org/mod_mbox/tiles-users/200904.mbox/%3caae96ca0904011317q202a3b6eib9d334ef880fb058@mail.gmail.com%3e

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TILES-391) Put Attribute tag does not seem to work with Freemarker

Posted by "Antonio Petrelli (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/TILES-391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45845#action_45845 ] 

Antonio Petrelli commented on TILES-391:
----------------------------------------

The docs are there:
http://tiles.apache.org/framework/tiles-jsp/tlddoc/tiles/putAttribute.html
http://tiles.apache.org/framework/tutorial/advanced/nesting-extending.html#Cascaded_attributes
However in this case, please use the Tiles users mailing list.

> Put Attribute tag does not seem to work with Freemarker
> -------------------------------------------------------
>
>                 Key: TILES-391
>                 URL: https://issues.apache.org/struts/browse/TILES-391
>             Project: Tiles
>          Issue Type: Bug
>          Components: tiles-core, tiles-freemarker
>    Affects Versions: 2.1.2
>         Environment: Mac OS
> Eclipse 3.4
> Tomcat 6.0.16
>            Reporter: Amin Mohammed-Coleman
>         Attachments: tiles.zip, tiles.zip
>
>
> When using jsp freemarker support the put-attribute fails to put an object into the page cope.  For example:
> tile A:
> <@tiles.insertDefinition name="put.attribute.tile">
> 	<@tiles.putAttribute name=personalContact value=pcobj />
> </...@tiles.insertDefinition>
> tile put.attribute.tile:
> <#assign tiles=JspTaglibs["http://tiles.apache.org/tags-tiles"] />
> <@tiles.importAttribute/>
> EMAIL : ${personalContact.email} <br/>
> FIRST NAME: ${personalContact.firstName} <br/>
> LAST NAME: ${personalContact.lastName} <br/>
> Produces a freemaker exception that the personContact is undefined.  
> Please refer to mailing list: 
> http://mail-archives.apache.org/mod_mbox/tiles-users/200904.mbox/%3caae96ca0904011317q202a3b6eib9d334ef880fb058@mail.gmail.com%3e

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.