Webwork2 Tag: Theme & template

Source: Internet
Author: User
Webwork2 Tag: Theme & template

use the UI tag provided by webwork on the JSP page, mainly the radio tag, at first, I was not quite comfortable with the XHTML theme template. Many table elements were inserted in the tag. Second, a label is automatically inserted when the radio tag is displayed. At the beginning, I only needed to add a tag's label or value to solve the problem. Later I realized that the template must be changed.

I browsed the theme and template related information of webwork and found that webwork provides us with a simple method to modify the tag template. Create the template directory in the web root directory as follows:

web context /:

-WEB-INF

-template

theme is equivalent to a set of templates ), similar to the package in Java. The tag templates of webwork are all velocity files, and velocity is a simple template language. If I want to remove the label in the radio tag, there are two methods:

1. Create a new template under the system's built-in XHTML/simple theme

you can create the XHTML directory under the template directory above., create a new radionolabel. VM, in this. remove the label from the VM file, and then specify a new template in the radio tag.

2. Create a new theme

in the template directory, create a new directory, such as nolabel, create a radio with the same name as XHTML/simple. VM, remove the label in the file, and then specify the new theme at the radio tag.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.