<template:notpresent>
The tag checks the non-existence of a JSP-fragment and in case of success,
executes the Body-Content
The tag may only be used within a <template:insert>-tag.
It can thus, in particular, be used in a JSP template, since
these are located in the Scope of a <template:insert>-tag!
[ Syntax ]
Standard Syntax
<template:notpresent
name =
"String"
>
...Body Content...
</template:notpresent>
[ Attributes ]
Attribute | Type | Description | Req. | RTExp |
name | String |
Specifies the logical name of a JSP-fragment.
Annotation:
The name must match with a placeholder in the JSP template used.
The template is defined in the enclosing <template:insert>-tag.
|
|
|
[ Example ]
The <template:notpresent>-tag is used in a template
to output a standard search screen.
<%@ taglib uri="http://www.common-controls.com/cc/tags-template" prefix="template" %>
<html>
<head/>
<body>
<table width="100%" cellspacing="0" cellpadding="0">
<!-- Suchmaske zeigen -->
<template:present name="search">
<tr>
<td><template:get name="search"/></td>
</tr>
</template:present>
<!-- Standard Suchmaske anzeigen -->
<template:notpresent name="search">
<tr>
<td>
Default Search Mask..
</td>
</tr>
</template:notpresent>
<tr>
<td><template:get name="mainmenu"/></td>
</tr>
</table>
</body>
</html>