zoukankan      html  css  js  c++  java
  • Struts(十五):主题

    • Theme主题是配置的struts-core.jar下的com.apache.struts2包下的default.properties中(默认配置为:xhtml)
    ### Standard UI theme
    ### Change this to reflect which path should be used for JSP control tag templates by default
    struts.ui.theme=xhtml
    struts.ui.templateDir=template
    ### Change this to use a different token to indicate template theme expansion
    struts.ui.theme.expansion.token=~~~
    #sets the default template type. Either ftl, vm, or jsp
    struts.ui.templateSuffix=ftl
    • theme主题一共包含几个可选项:

    struts2中theme属性包括xhtml,html,simple,ajax,默认是xhtml.
    theme:设置struts2标签的主题.
    theme=xhtml:会额外生成tr,td.
    theme=simple:生成所对应的html标签形式.

    • theme主题修改方式:
    1. 在struts.xml文件中修改默认值:<constant name="struts.ui.theme" value="simple"/>;
    2. 在struts.properties文件中,设置以下语句:struts.ui.theme=simple;
    3. form标签theme属性来修改:<s:form action="" method="" theme="simple">...</s:form>
    4. radio,checkbox等单独标签theme属性来修改:<s:radio name="" label="" list="" theme="simple"></s:radio>
    5. 在page,request,session或者application中添加一个theme属性:<%request.setAttribute("theme","simple");%>
  • 相关阅读:
    POJ3164 Command Network
    UVa11401 Triangle Counting
    UVa11174 Stand in a Line
    UVa11806 Cheerleaders
    Uva11538 Chess Queen
    Bzoj3130 [Sdoi2013]费用流
    Bzoj3262 陌上花开
    模拟25A 题解
    模拟24 题解
    模拟23 题解
  • 原文地址:https://www.cnblogs.com/yy3b2007com/p/6603138.html
Copyright © 2011-2022 走看看