You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Daniel Woo (JIRA)" <ji...@apache.org> on 2012/12/04 04:31:59 UTC

[jira] [Created] (WW-3937) The annotation @Result can have an extra attribute to hold tiles attributes

Daniel Woo created WW-3937:
------------------------------

             Summary: The annotation @Result can have an extra attribute to hold tiles attributes
                 Key: WW-3937
                 URL: https://issues.apache.org/jira/browse/WW-3937
             Project: Struts 2
          Issue Type: Improvement
          Components: Plugin - Tiles
    Affects Versions: 2.3.7
            Reporter: Daniel Woo
            Priority: Minor


Currently the @Result annotation for tiles can only specify a location to render, e.g.
@Action(value = "/home", results = {@Result(name = "success", location = "home", type = "tiles")})

What I want is to add a new attribute like this:
@Action(value = "/home", results = {@Result(name = "success", location = "home", tilesAttr={"loadcss", "/css/home.css"}, type = "tiles")})

The reason is to utilize wildcard tiles definition. Suppose we have the wildcard tiles definition below,

    <definition name="*.*.*" extends="{3}-layout">
        <put-attribute name="body" value="/view/{1}/{2}.jsp"/>
        <put-attribute name="loadcss" value=""/>
    </definition>
The tiles attribute 'loadcss' should be set dynamically, or specified in the annotation. Currently since the tiles plugin does not support the attribute yet, we have to do that in the tiles configuration file with <put-attribute>, that means we have to explicitly define each tiles definition without wildcard support.

--
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

Re: [jira] [Created] (WW-3937) The annotation @Result can have an extra attribute to hold tiles attributes

Posted by Niraj Sheth <ni...@gmail.com>.
Unsubscribe

On Monday, December 3, 2012, Daniel Woo (JIRA) wrote:

> Daniel Woo created WW-3937:
> ------------------------------
>
>              Summary: The annotation @Result can have an extra attribute
> to hold tiles attributes
>                  Key: WW-3937
>                  URL: https://issues.apache.org/jira/browse/WW-3937
>              Project: Struts 2
>           Issue Type: Improvement
>           Components: Plugin - Tiles
>     Affects Versions: 2.3.7
>             Reporter: Daniel Woo
>             Priority: Minor
>
>
> Currently the @Result annotation for tiles can only specify a location to
> render, e.g.
> @Action(value = "/home", results = {@Result(name = "success", location =
> "home", type = "tiles")})
>
> What I want is to add a new attribute like this:
> @Action(value = "/home", results = {@Result(name = "success", location =
> "home", tilesAttr={"loadcss", "/css/home.css"}, type = "tiles")})
>
> The reason is to utilize wildcard tiles definition. Suppose we have the
> wildcard tiles definition below,
>
>     <definition name="*.*.*" extends="{3}-layout">
>         <put-attribute name="body" value="/view/{1}/{2}.jsp"/>
>         <put-attribute name="loadcss" value=""/>
>     </definition>
> The tiles attribute 'loadcss' should be set dynamically, or specified in
> the annotation. Currently since the tiles plugin does not support the
> attribute yet, we have to do that in the tiles configuration file with
> <put-attribute>, that means we have to explicitly define each tiles
> definition without wildcard support.
>
> --
> 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
>