Include
Includes content from assets or classpath-ressources into the page.
Covers basic functionality of a more
sophisticated Include
component, that up to now has not been ported to Tap4.0.
Property reference
Name |
Type |
Required |
Default Value |
Description |
asset |
IAsset |
No |
|
The asset of which the content is to be included.
One of 'asset' or 'ressource' must be set.
|
ressource |
String |
No |
|
Alternatively to asset, a named classpath ressource can be specified.
One of 'asset' or 'ressource' must be set.
|
raw |
boolean |
No |
true |
If true, the printRaw(..) of the MarkupWriter is called
rather than the print(..) method.
If you want to show formatted HTML, set it to true.
|
encoding |
String |
No |
Default encoding
of java.io.
InputStreamReader |
The encoding that is used to convert the binary stream of the ressource to ASCII
|
element |
String |
No |
|
Name of a HTML-tag, that surrounds the text to be included.
Informal parameters are added to that tag.
|
converter |
net.sf.sotacs.
include.IConverter |
No |
|
If this is set, the text is converted by the convert-method of the IConverter before
it is included.
This can be used to replace/remove some parts of the original text.
|
Body : forbidden
Informal parameters : allowed.
The informal parameters are added to the surrounding
tag, if the latter is declared by the element-parameter
Example
The line
<pre jwcid="@sotacs:Include" element="pre"
asset="asset:someText">
preview text
</pre>
includes the content of the asset 'someText' into a surrounding
<pre>>-tag.