#literal() | |
<?xml version="1.0" encoding="utf-8"?> | |
<!-- | |
* Licensed to the Apache Software Foundation (ASF) under one | |
* or more contributor license agreements. See the NOTICE file | |
* distributed with this work for additional information | |
* regarding copyright ownership. The ASF licenses this file | |
* to you under the Apache License, Version 2.0 (the | |
* "License"); you may not use this file except in compliance | |
* with the License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, | |
* software distributed under the License is distributed on an | |
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
* KIND, either express or implied. See the License for the | |
* specific language governing permissions and limitations | |
* under the License. | |
--> | |
<taglib xmlns="http://java.sun.com/xml/ns/javaee" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd" | |
version="2.1"> | |
<tlib-version>1.1.7</tlib-version> | |
<short-name>$shortname</short-name> | |
<uri>$uri</uri> | |
<display-name>$displayname</display-name> | |
<description>$description</description> | |
$baseContent | |
<!-- Component Tags --> | |
#set ($componentList = ${model.getComponents()}) | |
#foreach( $component in $componentList ) | |
#if ($modelIds.contains($component.modelId) | |
&& ($component.name)) | |
#if ($utils.getTagPrefix($component.name) == $shortname) | |
<tag> | |
<name>$utils.getTagName($component.name)</name> | |
<tag-class>$component.tagClass</tag-class> | |
#if ($component.bodyContent) | |
<body-content>$component.bodyContent</body-content> | |
#else | |
<body-content>JSP</body-content> | |
#end | |
<description><![CDATA[$component.longDescription]]></description> | |
#set ($propertyList = ${component.propertyList}) | |
#foreach( $property in $propertyList ) | |
#if (!$property.isTagExcluded()) | |
<attribute> | |
<name>$property.jspName</name> | |
#if ($property.isRequired()) | |
<required>$property.isRequired()</required> | |
#end | |
#if ($property.isMethodExpression() || $property.isMethodBinding()) | |
#if ($property.getMethodBindingSignature()) | |
<deferred-method> | |
#set ($sig = $property.getMethodBindingSignature()) | |
<method-signature>$sig.returnType myMethod( $sig.parameterTypesAsString )</method-signature> | |
</deferred-method> | |
#else | |
## This is a very special case. If a property is MethodBinding or MethodExpression | |
## this should have a signature. If not, for allow multiple MethodBinding | |
## simulate a ValueExpression and write a custom code like in | |
## org.apache.myfaces.custom.suggestajax.AbstractSuggestAjaxTag | |
<deferred-value/> | |
#end | |
#elseif ($property.isLiteralOnly()) | |
<rtexprvalue>false</rtexprvalue> | |
#else | |
#set ($type = $utils.getClassFromFullClass($property.className)) | |
#if ($type == "String") | |
<deferred-value></deferred-value> | |
#else | |
<deferred-value> | |
<type>$property.className</type> | |
</deferred-value> | |
#end | |
#end | |
#if ($property.longDescription) | |
<description><![CDATA[$property.longDescription]]></description> | |
#else | |
<description><![CDATA[]]></description> | |
#end | |
</attribute> | |
#end | |
#end | |
</tag> | |
#end | |
#end | |
#end | |
<!-- Converter tags --> | |
#set ($componentList = ${model.getConverters()}) | |
#foreach( $component in $componentList ) | |
#if ($modelIds.contains($component.modelId) | |
&& ($component.name)) | |
#if ($utils.getTagPrefix($component.name) == $shortname) | |
<tag> | |
<name>$utils.getTagName($component.name)</name> | |
<tag-class>$component.tagClass</tag-class> | |
#if ($component.bodyContent) | |
<body-content>$component.bodyContent</body-content> | |
#else | |
<body-content>empty</body-content> | |
#end | |
<description><![CDATA[$component.longDescription]]></description> | |
#set ($propertyList = ${component.propertyList}) | |
#foreach( $property in $propertyList ) | |
#if (!$property.isTagExcluded()) | |
<attribute> | |
<name>$property.name</name> | |
#if ($property.isRequired()) | |
<required>$property.isRequired()</required> | |
#end | |
#if ($property.isLiteralOnly()) | |
<rtexprvalue>false</rtexprvalue> | |
#else | |
#set ($type = $utils.getClassFromFullClass($property.className)) | |
#if ($type == "String") | |
<deferred-value></deferred-value> | |
#else | |
<deferred-value> | |
<type>$property.className</type> | |
</deferred-value> | |
#end | |
#end | |
#if ($property.longDescription) | |
<description><![CDATA[$property.longDescription]]></description> | |
#else | |
<description><![CDATA[]]></description> | |
#end | |
</attribute> | |
#end | |
#end | |
</tag> | |
#end | |
#end | |
#end | |
<!-- Validator tags --> | |
#set ($componentList = ${model.getValidators()}) | |
#foreach( $component in $componentList ) | |
#if ($modelIds.contains($component.modelId) | |
&& ($component.name)) | |
#if ($utils.getTagPrefix($component.name) == $shortname) | |
<tag> | |
<name>$utils.getTagName($component.name)</name> | |
<tag-class>$component.tagClass</tag-class> | |
#if ($component.bodyContent) | |
<body-content>$component.bodyContent</body-content> | |
#else | |
<body-content>empty</body-content> | |
#end | |
<description><![CDATA[$component.longDescription]]></description> | |
#set ($propertyList = ${component.propertyList}) | |
#foreach( $property in $propertyList ) | |
#if (!$property.isTagExcluded()) | |
<attribute> | |
<name>$property.name</name> | |
#if ($property.isRequired()) | |
<required>$property.isRequired()</required> | |
#end | |
#if ($property.isLiteralOnly()) | |
<rtexprvalue>false</rtexprvalue> | |
#else | |
#set ($type = $utils.getClassFromFullClass($property.className)) | |
#if ($type == "String") | |
<deferred-value></deferred-value> | |
#else | |
<deferred-value> | |
<type>$property.className</type> | |
</deferred-value> | |
#end | |
#end | |
#if ($property.longDescription) | |
<description><![CDATA[$property.longDescription]]></description> | |
#else | |
<description><![CDATA[]]></description> | |
#end | |
</attribute> | |
#end | |
#end | |
</tag> | |
#end | |
#end | |
#end | |
<!-- Single Tags --> | |
#set ($tagList = $model.getTags()) | |
#foreach( $tag in $tagList ) | |
#if ($modelIds.contains($tag.modelId)) | |
<tag> | |
<name>$utils.getTagName($tag.name)</name> | |
<tag-class>$tag.className</tag-class> | |
<body-content>$tag.bodyContent</body-content> | |
<description><![CDATA[$tag.longDescription]]></description> | |
#set ($attributeList = ${tag.attributeList}) | |
#foreach( $attribute in $attributeList ) | |
<attribute> | |
<name>$attribute.name</name> | |
<required>$attribute.isRequired()</required> | |
#set ($type = $utils.getClassFromFullClass($attribute.className)) | |
#if ($type == "ValueExpression") | |
<deferred-value></deferred-value> | |
#else | |
<rtexprvalue>$attribute.isRtexprvalue()</rtexprvalue> | |
#if ($attribute.className) | |
<type>$attribute.className</type> | |
#else | |
<type>java.lang.String</type> | |
#end | |
#end | |
#if ($property.longDescription) | |
<description><![CDATA[$property.longDescription]]></description> | |
#else | |
<description><![CDATA[]]></description> | |
#end | |
</attribute> | |
#end | |
</tag> | |
#end | |
#end | |
</taglib> | |
#end |