Issue Details (XML | Word | Printable)

Key: WW-611
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Patrick Lightbody
Reporter: James Lee
Votes: 0
Watchers: 1
Operations

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

Error in Freemarker docs

Created: 10/Aug/04 07:01 AM   Updated: 01/Apr/05 03:34 AM
Component/s: Documentation
Affects Version/s: 2.1
Fix Version/s: 2.1.2


 Description  « Hide
On http://www.opensymphony.com/webwork/wikidocs/TutorialLesson04-03.html, the docs state that $wwUtil will make available an instance of com.opensymphony.webwork.util.FreemarkerWebWorkUtil to the template.

If you use $wwUtil, you get an exception similar to

Expression wwUtil is undefined on line 78, column 3 in WEB-INF/ftl/header.ftl.
The problematic instruction:
----------
==> ${wwUtil} [on line 78, column 1 in WEB-INF/ftl/header.ftl]
 in include "header.ftl" [on line 1, column 1 in WEB-INF/ftl/Home.ftl]
----------

Java backtrace for programmers:
----------
freemarker.core.InvalidReferenceException: Expression wwUtil is undefined on line 78, column 3 in WEB-INF/ftl/header.ftl.


After looking through $SRC\java\com\opensymphony\webwork\views\freemarker\FreemarkerManager.java, I found that (on line 179) the key is being set as KEY_WEBWORK instead of KEY_WWUTIL. I have no idea whether this is a bug or error in documentation, just thought I would bring it to your attention.

Other than that, thanks for a great product!!


 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Patrick Lightbody added a comment - 10/Sep/04 12:17 PM
the correct value to use is $webwork. I've fixed this in the docs. Thanks.

Jinlong Du added a comment - 13/Oct/04 08:39 PM
I have changed the '${wwUtil}' to '${webwork}',but
it still has errors!
----------
FreeMarker template error!

Expression webwork.buildUrl is undefined on line 10, column 25 in ftl/index.ftl.
The problematic instruction:
----------
==> ${webwork.buildUrl('indexFreemarker.action')} [on line 10, column 23 in ftl/index.ftl]
----------

Java backtrace for programmers:
----------
freemarker.core.InvalidReferenceException: Expression webwork.buildUrl is undefined on line 10, column 25 in ftl/index.ftl.

--------------
please help me! thanks!

Richard HALLIER added a comment - 15/Oct/04 04:57 AM
The buildUrl method has been removed. I dont know why ? the use of the WW2 url tag is tedious, it should be re-added.

Patrick Yang added a comment - 01/Apr/05 03:34 AM