Copy Code code as follows:
<?xml version= "1.0" encoding= "UTF-8"?>
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<meta name= "keywords" content= "${ks}" >
<meta name= "description" content= "${desc}" >
<title>${title}</title>
<body >
<t:body/>
</body>
For example, as in the previous template page, when used, want to change the inside of the title,keywords,description dynamically.
Add a code similar to the following in the Java class on the stencil page:
Copy Code code as follows:
@Parameter (Defaultprefix = Bindingconstans.literal,name = "title", Requred=true)//I set this as the parameter must \
@Property (Write=false)//callout attributes that are not writable
Private String title;
Last in use:
Copy Code code as follows:
<div t:type= "template" xmlns:t= "http://tapestry.apache.org/schema/tapestry_5_0_0.xsd" title= "Write your parameters here" >
Xxx
</div>
After rearranging the server, it has been found that the normal caption properties can be displayed ....