Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Programming \ Struts2 form of non-use component tags     - Oracle 11g em start newspaper site's security certificate has a solution to the problem (Database)

- Depth understanding of Python character set encoding (Programming)

- Docker deployment practices in Ubuntu (Server)

- Python 2.7 installed on CentOS 6.5 (Linux)

- Linux System Getting Started Learning: Repair (Linux)

- PLSQL often lose resolution process automatically disconnect the connection (Database)

- The basic method RHEL6 (CentOS6) used in the source package compiled RPM: Upgrade OpenSSH articles (Linux)

- Hadoop connection failed or stuck processing (Server)

- Create Your Own Docker base image in two ways (Linux)

- The default permissions for files and directories under Linux computing (Linux)

- Recovery from MySQL master data consistency summary (Database)

- Modern Objective-C syntax and new features (Programming)

- CentOS 6.4 OpenNebula installation (Linux)

- Cobbler batch install Ubuntu / CentOS system (Linux)

- Linux NFS FTP use (Server)

- Stucts2 values on the page and how the attribute values corresponding to the Action (Programming)

- A brief description of Java 8 new features introduced syntax (Programming)

- Linux Getting Started Tutorial: / var / spool / clientmqueue fill the root directory (Linux)

- Towards Docker (Server)

- C ++ inline functions (Programming)

 
         
  Struts2 form of non-use component tags
     
  Add Date : 2018-11-21      
         
         
         
  Struts2. Component tag
    component tag is used to using your own custom components, this is a very flexible usage, if you often need to use a clip effect, consider the definition of this effect clip into a custom assembly, and then use the component tag to the page use the custom component. Because the use of custom components or topic-based, template management, and therefore the use of component labels, often need to specify the following three properties:
 theme: the theme from custom components used, if the attribute is not specified, the xhtml theme.
 templateDir: specify a custom assembly theme directory, if not specified, the system default theme directory, that template directory.
 template: specify template custom components used.
In addition, you can use sub-param tag within cmponent label, the label indicates the child passed to the label template additional parameters. If you want to get the parameter in the template, always takes the form: $ parameters.paramname, or $ parameters [ 'paramname'].
Tip: Custom template files can use FreeMarker, JSP and Velocity three techniques to write.
Consider the following JSP page that repeatedly uses the < s: component ... /> tag to use custom components, the following is the page using the < s: component ... /> tag code snippet:

Use custom themes, custom theme directory < br>
Load Template from the Web application root path, use ftl templates.
< S: component
        theme = "customTheme"
        templateDir = "customTemplateDir"
        template = "ftlCustomTemplate">
< S: param name = "list" value = "{ 'Spring2.0 Collection', 'Lightweight J2EE enterprise applications in actual combat,' 'based on J2EE Ajax Collection'}" />
< / S: component>
< Hr />
Use custom themes, custom theme directory < br>
Load Template from the Web application root path, using JSP template.
< S: component
        theme = "customTheme"
        templateDir = "customTemplateDir"
        template = "jspCustomTemplate.jsp">
< S: param name = "list" value = "{ 'Spring2.0 Collection', 'Lightweight J2EE enterprise applications in actual combat,' 'based on J2EE Ajax Collection'}" />
< / S: component>
< Hr />
Use default theme (xhtml), default theme directory (template) < br>
Load Template from Web applications using JSP template.
< S: component template = "mytemplate.jsp">
< S: param name = "list" value = "{ 'Spring2.0 Collection', 'Lightweight J2EE enterprise applications in actual combat,' 'based on J2EE Ajax Collection'}" />
< / S: component>
< Hr />
Use custom themes, custom theme directory < br>
Load Template from the / WEB-INF / classes path, use ftl templates.
< S: component
theme = "myTheme"
templateDir = "myTemplateDir"
template = "myAnotherTemplate">
< S: param name = "list" value = "{ 'Spring2.0 Collection', 'Lightweight J2EE enterprise applications in actual combat,' 'based on J2EE Ajax Collection'}" />
< / S: component>

In the above pages using two FreeMarker templates, both FreeMarker FreeMarker templates use tags. In addition, this page also uses two JSP templates, the two JSP page just loaded a different location, two template code is the same, the following is the JSP template code:

< ! - Settings page Coding ->
< % @ Page contentType = "text / html; charset = GBK" language = "java"%>
< % @ Taglib prefix = "s" uri = "/ struts-tags"%>
< Div style = "">
< B> JSP custom template < br>
Please select your favorite books < br> < / b>
< ! - Label use iterative select list output parameters worn over set ->
< S: select list = "parameters.list" />
< / Div>
     
         
         
         
  More:      
 
- Linux permissions Detailed (Linux)
- TL-WR703N to install OpenWrt process notes (Linux)
- Iptables in Ubuntu (Linux)
- MySQL flip-flop (Database)
- Regular expressions in Perl (Programming)
- CentOS / RedHat system partition essential requirements and partition scheme (Linux)
- 64 Ubuntu 15.04 Linux kernel upgrade to Linux 4.1.0 (Linux)
- Swift rewrite initialize method of navigation controller class (Programming)
- CentOS install SVN server configuration and automatically synchronized to the Web directory (Server)
- Applications Linux leap second problem caused (Linux)
- JavaScript cross-browser event object library (Programming)
- Debian 7.7 Installation and Configuration (Linux)
- Not safe procedure under Linux (Linux)
- iOS in the event delivery and the responder chain (Programming)
- Security: set limits on password (Linux)
- Calling Qt libraries to implement functional processes of some summary (Programming)
- Linux operating system security settings initial understanding (Linux)
- How to contribute code on GitHub uploads (Linux)
- Increase ssh security service under Linux (Linux)
- Java proxy use and proxy principle (Programming)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.