struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lukasz Lenart (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (WW-4161) Incorporate tiles3 into conventions, tutorial (and add code to tiles3 plugin)
Date Fri, 11 Jul 2014 18:56:05 GMT

    [ https://issues.apache.org/jira/browse/WW-4161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14059003#comment-14059003
] 

Lukasz Lenart edited comment on WW-4161 at 7/11/14 6:54 PM:
------------------------------------------------------------

For people thinking of using Tiles it should be noted that this
demonstrates the annotation functionality, and not the minimal way of using
tiles 3 with Struts2.
>From memory, so this might not be exactly right:

But instead of MUTABLE
(org.apache.tiles.factory.TilesContainerFactory.MUTABLE), COMPLETE is used
the Tiles3 has access to OGNL expressions among other ELs.

The demo should then be able to remove the annotations by changing the
following tiles.xml:
{code:xml}
        <put-attribute name="titleMsgKey" value=".titleMsgKey" />
        <put-attribute name="content" value=".content" />
{code}
then becomes:
{code:xml}
        <put-attribute name="titleMsgKey" value="OGNL:titleMsgKey" />
        <put-attribute name="content" value="OGNL:content" />
{code}
And it will pull the values right out of the value stack. The annotations
are valuable (they must be used if not using "COMPLETE"), the reason for
this comment is that there are few formal struts2 tiles3 integration
documents and I wouldn't want people to think this was minimal. Someone
will think they need to manually bind data when using tiles if this option
isn't provided.


On Fri, Jul 11, 2014 at 2:50 AM, Lukasz Lenart (JIRA) <jira@apache.org>




was (Author: ken_mcwilliams):
For people thinking of using Tiles it should be noted that this
demonstrates the annotation functionality, and not the minimal way of using
tiles 3 with Struts2.
>From memory, so this might not be exactly right:

But instead of MUTABLE
(org.apache.tiles.factory.TilesContainerFactory.MUTABLE), COMPLETE is used
the Tiles3 has access to OGNL expressions among other ELs.

The demo should then be able to remove the annotations by changing the
following tiles.xml:
        <put-attribute name="titleMsgKey" value=".titleMsgKey" />
        <put-attribute name="content" value=".content" />

then becomes:

        <put-attribute name="titleMsgKey" value="OGNL:titleMsgKey" />
        <put-attribute name="content" value="OGNL:content" />

And it will pull the values right out of the value stack. The annotations
are valuable (they must be used if not using "COMPLETE"), the reason for
this comment is that there are few formal struts2 tiles3 integration
documents and I wouldn't want people to think this was minimal. Someone
will think they need to manually bind data when using tiles if this option
isn't provided.


On Fri, Jul 11, 2014 at 2:50 AM, Lukasz Lenart (JIRA) <jira@apache.org>



> Incorporate tiles3 into conventions, tutorial (and add code to tiles3 plugin)
> -----------------------------------------------------------------------------
>
>                 Key: WW-4161
>                 URL: https://issues.apache.org/jira/browse/WW-4161
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Plugin - Tiles
>            Reporter: Ken McWilliams
>             Fix For: 2.3.18
>
>         Attachments: struts2-tiles-annotations.patch, struts2-tiles-annotations.patch
>
>
> There is a description found here: http://stackoverflow.com/questions/11161194/freemarker-and-struts2-tags
> It would be good if the struts2 website could turn the following into a tutorial, possibly
some of the code could be included into the tile3 plugin but I'm not convinced at this time
that should be done. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message