You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tiles.apache.org by "Tomasz Ducin (JIRA)" <ji...@apache.org> on 2013/02/26 00:26:14 UTC

[jira] [Updated] (TILES-564) access definition name from ViewPreparer

     [ https://issues.apache.org/jira/browse/TILES-564?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tomasz Ducin updated TILES-564:
-------------------------------

    Description: 
Hi! I've been searching over the web since few days and haven't managed to find any solution to the problem: how to access the name of the definition from inside a custom ViewPreparer? There are also unreplied questions on stackoverflow where people ask about the same (http://stackoverflow.com/questions/15076272/apache-tiles-get-view-name-inside-viewpreparer, http://stackoverflow.com/questions/10088148/can-i-access-the-apache-tiles-definition-name-inside-a-viewpreparer). The only workaround that I found is just to pass another attribute to the definition, so as it looks not too good:

{code}
    <definition name="t.song" extends="t.container">
        <put-attribute name="body" value="/WEB-INF/jsp/song.jsp"/>
        <put-attribute name="title" expression="${song.title} - ${song.author} in ${jukebox.name}"/>
        <put-attribute name="view" value="song"/>
    </definition>
{code}

If this feature is already possible, please let us know. It'd be great if the docs could be improved in the appropriate chapter. Thank you in advance

  was:
Hi! I've been searching over the web since few days and haven't managed to find any solution to the problem: how to access the name of the definition from inside a custom ViewPreparer? There are also unreplied questions on stackoverflow where people ask about the same (http://stackoverflow.com/questions/15076272/apache-tiles-get-view-name-inside-viewpreparer, http://stackoverflow.com/questions/10088148/can-i-access-the-apache-tiles-definition-name-inside-a-viewpreparer). The only workaround that I found is just to pass another attribute to the definition, so as it looks not too good:

    <definition name="t.song" extends="t.container">
        <put-attribute name="body" value="/WEB-INF/jsp/song.jsp"/>
        <put-attribute name="title" expression="${song.title} - ${song.author} in ${jukebox.name}"/>
        <put-attribute name="view" value="song"/>
    </definition>

If this feature is already possible, please let us know. It'd be great if the docs could be improved in the appropriate chapter. Thank you in advance

    
> access definition name from ViewPreparer
> ----------------------------------------
>
>                 Key: TILES-564
>                 URL: https://issues.apache.org/jira/browse/TILES-564
>             Project: Tiles
>          Issue Type: New Feature
>          Components: tiles-api
>            Reporter: Tomasz Ducin
>              Labels: docuentation, features
>
> Hi! I've been searching over the web since few days and haven't managed to find any solution to the problem: how to access the name of the definition from inside a custom ViewPreparer? There are also unreplied questions on stackoverflow where people ask about the same (http://stackoverflow.com/questions/15076272/apache-tiles-get-view-name-inside-viewpreparer, http://stackoverflow.com/questions/10088148/can-i-access-the-apache-tiles-definition-name-inside-a-viewpreparer). The only workaround that I found is just to pass another attribute to the definition, so as it looks not too good:
> {code}
>     <definition name="t.song" extends="t.container">
>         <put-attribute name="body" value="/WEB-INF/jsp/song.jsp"/>
>         <put-attribute name="title" expression="${song.title} - ${song.author} in ${jukebox.name}"/>
>         <put-attribute name="view" value="song"/>
>     </definition>
> {code}
> If this feature is already possible, please let us know. It'd be great if the docs could be improved in the appropriate chapter. Thank you in advance

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira