Struts2.1.6s: solve the problem that the datetimepicker label cannot be used

Source: Internet
Author: User

When I wrote a program today, I used <s: datetimepicker>. The result page is not displayed. Later, I checked it on the Internet and set <s: Head theme = "ajax"/> In the head tag. The following is the original article, hoping to help you.


1. The datetimepicker cannot be used directly in version 2.1.6. This label calls the datetimepicker library of dojo. Therefore, you need to import a library before using it. Struts2-dojo-plugin-2.1.6.jar

2. Set the taglib of dojo.

Java code

<% @ Taglib prefix = "SD" uri = "/Struts-Dojo-tags" %>

<% @ Taglib prefix = "SD" uri = "/Struts-Dojo-tags" %>

You also need to set theme

Java code
  1. <S: Head theme = "XHTML"/>
  2. <SD: Head parsecontent = "true"/>

The above settings are in the head label.
Then, use S: datetimepocker to implement it.

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.