Issue Details (XML | Word | Printable)

Key: WW-1120
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Rainer Hermanns
Reporter: Eric Molitor
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
WebWork

Allow setting templateSuffix on a per Page basis (With patch and UntiTests)

Created: 25/Jan/06 02:51 AM   Updated: 25/Jan/06 11:21 AM
Component/s: Views
Affects Version/s: 2.2, 2.2.1
Fix Version/s: 2.2.1

Environment: All
Issue Links:
Container
 

Flags: Important, Patch


 Description  « Hide
At work we use velocity and the old velocity based WW taglibs quite heavily. Since 2.2 the Velocity taglibs have been removed and the WW taglibs now use FreeMarker. The FreeMarker taglibs are excellent and we enjoy using FreeMarker as a templating engine however the tags differ in both behavior and the HTML produced. Because of this some of our pages must keep using the old Velocity taglibs until they can be converted. This patch allows templateSuffix to be specified on a page by page basis allowing for a slow controlled migration. To specify a templateSuffix on a per page basis simply use the set tag to specify a known template extension.

<ww:set name="templateSuffix" value="'ftl'"/>

This code was based off of the altSyntax code which was added in 2.2.

The zip includes the four modified files and the other link is a page describing the changes and why I made them. I originally had a smaller version that only changed UIBean and ContextUtil but it wasn't very clean and wasn't easily unit tested. This version, while larger in scope is a bit cleaner and should have full coverage when run with the rest of the WebWork unit tests. If you want a *real* patch let me know and I'll produce one.

http://www.tuxbot.net/webwork/templateSuffix.zip
http://www.tuxbot.net/webwork


 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Eric Molitor added a comment - 25/Jan/06 11:09 AM

Rainer Hermanns added a comment - 25/Jan/06 11:21 AM
patch applied, thanks :)