struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lukasz Lenart <lukaszlen...@apache.org>
Subject Re: struts2 conventions plugin - how to override result type
Date Sat, 08 Dec 2012 13:42:14 GMT
2012/12/6 Ken McWilliams <ken.mcwilliams@gmail.com>:
> The right thing to do was override the ConventionsUnknownHandler like you
> suggested. Right now the code is pretty ugly, I need to add unit tests to
> my TilesUnknownHandler and then I wouldn't mind contributing it.
>
> When the struts2-tiles-plugin is upgraded to account for tiles3 it would be
> nice if it would check to see if the conventions plugin is in the class
> path and then use then use the tiles result type by default (or if not by
> default then as at least as an option).
>
> Currently either the TilesUnknownHandler or the TilesResultType produces a
> location of (namespace + "#" + file) and feeds that string as a tiles
> definition:
>
>     <definition name="REGEXP:(.*)#(.*)"  extends="/test">
>         <put-attribute name="body" value="/WEB-INF/content{1}/{2}"/>
>     </definition>
>
> The thing now is to define a convention for locating templates that makes
> sense. Someway of dynamically generating tiles definitions from the content
> under /WEB-INF.

If you will be ready, feel free to register an issue with patch attached :-)


Kind regards
-- 
Ɓukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message