Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Velocity tags are extensions of the generic Tags provided by WebWork. You can get started almost immediately by simply knowing the generic structure in which the tags can be accessed: #wwxxx #wwxxx (...) ... #end, where xxx is any of the tags Tags supported by WebWork.

Note

As of WebWork 2.2, the use of Velocity support for the templating internal WebWork UI Tags in WebWork has been deprecated. Many of the new internal 2.2 UI Tag features were not built for Velocity, and moving forward Velocity support , support for the legacy internal templates of Velocity Tags may be removed entirely. We highly recommend you look at FreeMarker. However, general Velocity support is still actively supported and developed. On top of that, you can use the FreeMarker UI Tags with Velocity pages. The new and legacy 2.2 UI tags have been implemented in FreeMarker.

However, support for the Velocity result type as well as the Velocity directives shown below will continue to be supported and developed. By default, WebWork's TemplateEngine will call the FreeMarker UI Tags using the Velocity syntax noted below (through Velocity directives).

See WebWork 2 UI Tag Guide for more information.

Syntax

For example, in JSP you might create a form like so:

...

Code Block
xml
xml
#wwform ("action=updatePerson")
    #wwtextfield ("label=First name" "name="firstName")
    #wwsubmit ("value=Update")
#end

...