You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2008/06/04 05:38:34 UTC

svn commit: r662967 - in /myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/tomahawk12_trunk/sandbox/core12/src/main/resources/META-INF: NOTICE.txt tagClass12.vm tagConverterClass12.vm tagValidatorClass12.vm tomahawk12.vm

Author: lu4242
Date: Tue Jun  3 20:38:34 2008
New Revision: 662967

URL: http://svn.apache.org/viewvc?rev=662967&view=rev
Log:
Component generation for tomahawk12

Added:
    myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/tomahawk12_trunk/sandbox/core12/src/main/resources/META-INF/NOTICE.txt   (with props)
    myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/tomahawk12_trunk/sandbox/core12/src/main/resources/META-INF/tagClass12.vm
    myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/tomahawk12_trunk/sandbox/core12/src/main/resources/META-INF/tagConverterClass12.vm
    myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/tomahawk12_trunk/sandbox/core12/src/main/resources/META-INF/tagValidatorClass12.vm
    myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/tomahawk12_trunk/sandbox/core12/src/main/resources/META-INF/tomahawk12.vm

Added: myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/tomahawk12_trunk/sandbox/core12/src/main/resources/META-INF/NOTICE.txt
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/tomahawk12_trunk/sandbox/core12/src/main/resources/META-INF/NOTICE.txt?rev=662967&view=auto
==============================================================================
--- myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/tomahawk12_trunk/sandbox/core12/src/main/resources/META-INF/NOTICE.txt (added)
+++ myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/tomahawk12_trunk/sandbox/core12/src/main/resources/META-INF/NOTICE.txt Tue Jun  3 20:38:34 2008
@@ -0,0 +1,32 @@
+Apache MyFaces
+Copyright 2004-2007 The Apache Software Foundation
+
+This product includes software developed by:
+The Apache Software Foundation (http://www.apache.org/).
+
+------------------------------------------------------------------------
+See the file LICENSE.txt
+See licenses for accompanying products in the "/licenses" subdirectory.
+------------------------------------------------------------------------
+
+This product includes software developed by Heng Yuan (jscookmenu)
+http://www.cs.ucla.edu/~heng/JSCookMenu
+
+This product includes software developed by Sam Stephenson (the ProtoType library)
+http://conio.net/
+
+This product includes software developed by Thomas Fuchs (the Ruby on Rails Ajax javascript extensions, script.aculo.us)
+http://script.aculo.us/
+
+This product includes software developed by the Kupu Project
+(http://kupu.oscom.org/).
+
+This product includes Sarissa ECMAScript written by Manos Batsis, released under
+the Kupu License with kind permission by the author (used by the Kupu HTML editor). See the Sarissa
+homepage at http://sarissa.sourceforge.net/ for more information.
+
+This product includes software developed by Guido Wesdorp (i18n.js, used by the KUPU html editor)
+(http://kupu.oscom.org/).
+
+This product includes software developed by Dojo Foundation (http://dojotoolkit.org/foundation/)
+http://www.dojotoolkit.org/

Propchange: myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/tomahawk12_trunk/sandbox/core12/src/main/resources/META-INF/NOTICE.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/tomahawk12_trunk/sandbox/core12/src/main/resources/META-INF/NOTICE.txt
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/tomahawk12_trunk/sandbox/core12/src/main/resources/META-INF/tagClass12.vm
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/tomahawk12_trunk/sandbox/core12/src/main/resources/META-INF/tagClass12.vm?rev=662967&view=auto
==============================================================================
--- myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/tomahawk12_trunk/sandbox/core12/src/main/resources/META-INF/tagClass12.vm (added)
+++ myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/tomahawk12_trunk/sandbox/core12/src/main/resources/META-INF/tagClass12.vm Tue Jun  3 20:38:34 2008
@@ -0,0 +1,170 @@
+// WARNING: This file was automatically generated. Do not edit it directly,
+//          or you will lose your changes.
+/*
+ *  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.
+ */
+package ${component.tagPackage};
+
+import javax.faces.component.UIComponent;
+import javax.el.ValueExpression;
+import javax.el.MethodExpression;
+import javax.faces.context.FacesContext;
+$utils.importTagClasses12($component)
+
+public class $utils.getClassFromFullClass($component.tagClass)
+#if (${component.tagSuperclass})
+    extends ${component.tagSuperclass}
+#else
+    extends javax.faces.webapp.UIComponentTag
+#end
+{
+    public $utils.getClassFromFullClass($component.tagClass)()
+    {    
+    }
+    
+    public String getComponentType()
+    {
+#if ($component.type)
+        return "$component.type";
+#else
+        return null;
+#end
+    }
+
+    public String getRendererType()
+    {
+#if ($component.rendererType)
+        return "$component.rendererType";
+#else
+        return null;
+#end
+    }
+
+#set ($propertyList = ${component.propertyTagList})
+#foreach( $property in $propertyList )
+#set ($field = $property.fieldName)
+#set ($type = $utils.getJspPropertyType12($property))
+ 
+    private $type $field;
+    
+#set ($var = $utils.getVariableFromName($property.name))
+    public void $utils.getPrefixedPropertyName("set", $property.jspName)($type $var)
+    {
+        $field = $var;
+    }
+#end
+
+    protected void setProperties(UIComponent component)
+    {
+        if (!(component instanceof $component.className))
+        {
+            throw new IllegalArgumentException("Component "+
+                component.getClass().getName() +" is no $component.className");
+        }
+        
+        $component.className comp = ($component.className) component;
+        
+        super.setProperties(component);
+        
+        FacesContext context = getFacesContext();
+
+#foreach( $property in $propertyList )##            1
+#set ($field = $property.fieldName)
+#set ($type = $utils.getJspPropertyType12($property))
+#if ($utils.isConverter($property.className))##                   2
+        if ($field != null)
+        {
+            if (!${field}.isLiteralText())
+            {
+                comp.setValueExpression("$property.name", $field);
+            }
+            else
+            {
+                String s = ${field}.getExpressionString();
+                if (s != null)
+                {            
+                    Converter converter = getFacesContext().getApplication().createConverter(s);
+                    comp.setConverter(converter);
+                }
+            }
+        }
+#elseif ($property.isMethodBinding())##                 2
+        if ($field != null)
+        {
+#if ($property.jspName == "actionListener")
+            comp.addActionListener(new MethodExpressionActionListener($field));
+#elseif ($property.jspName == "valueChangeListener")
+            comp.addValueChangeListener(new MethodExpressionValueChangeListener($field));
+#elseif ($property.jspName == "validator")
+            comp.addValidator(new MethodExpressionValidator($field));
+#elseif ($utils.isStringMethodBindingReturnType($property.methodBindingSignature))##3
+            MethodBinding mb;
+            if (isValueReference($field))
+            {
+                mb = context.getApplication().createMethodBinding(
+                    $field, $utils.getSignatureParams($property.methodBindingSignature));            
+            }
+            else
+            {
+                throw new IllegalStateException("Invalid expression " + $field);
+            }
+            comp.${utils.getPrefixedPropertyName("set",$property.name)}(mb);
+#else##                                                 3
+            MethodBinding mb = context.getApplication().createMethodBinding(
+                $field, $utils.getSignatureParams($property.methodBindingSignature));
+            comp.${utils.getPrefixedPropertyName("set",$property.name)}(mb);
+#end##                                                  3
+        }
+#elseif ($property.isMethodExpression())##            2
+        if ($field != null)
+        {
+#if ($property.jspName == "action")
+            comp.setActionExpression($field);
+#elseif ($property.jspName == "actionListener")
+            comp.addActionListener(new MethodExpressionActionListener($field));
+#else
+            comp.${utils.getPrefixedPropertyName("set",$property.name)}($field);
+#end        
+        }        
+#else##                                               2
+        if ($field != null)
+        {
+#if ($property.isLiteralOnly())##                         3
+            comp.getAttributes().put("$property.name", $field);
+#else##                                                 3
+            comp.setValueExpression("$property.name", $field);
+#end##                                                  3
+        } 
+#end##                                                2
+#end##                                              1
+    }
+
+    public void release()
+    {
+        super.release();
+#foreach( $property in $propertyList )
+#set ($field = $property.fieldName)
+#if($utils.getJspPropertyType12($property) == "boolean")
+#set ($empty = "false")
+#else
+#set ($empty = "null")
+#end
+        $field = $empty;
+#end
+    }
+}
\ No newline at end of file

Added: myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/tomahawk12_trunk/sandbox/core12/src/main/resources/META-INF/tagConverterClass12.vm
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/tomahawk12_trunk/sandbox/core12/src/main/resources/META-INF/tagConverterClass12.vm?rev=662967&view=auto
==============================================================================
--- myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/tomahawk12_trunk/sandbox/core12/src/main/resources/META-INF/tagConverterClass12.vm (added)
+++ myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/tomahawk12_trunk/sandbox/core12/src/main/resources/META-INF/tagConverterClass12.vm Tue Jun  3 20:38:34 2008
@@ -0,0 +1,167 @@
+// WARNING: This file was automatically generated. Do not edit it directly,
+//          or you will lose your changes.
+/*
+ *  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.
+ */
+package $utils.getPackageFromFullClass($converter.tagClass);
+
+import javax.faces.context.FacesContext;
+import javax.el.ELContext;
+import javax.faces.convert.Converter;
+import javax.el.ValueExpression;
+import javax.faces.webapp.UIComponentTag;
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.PageContext;
+$utils.importTagClasses($converter)
+
+public class $utils.getClassFromFullClass($converter.tagClass)
+#if (${converter.tagSuperclass})
+    extends ${converter.tagSuperclass}
+#else
+    extends org.apache.myfaces.converter.ConverterTag
+#end
+{
+#if ($converter.serialuidtag)
+    private static final long serialVersionUID = ${converter.serialuidtag}; 
+#end  
+
+    public $utils.getClassFromFullClass($converter.tagClass)()
+    {
+        setConverterIdString("$converter.converterId");
+    }
+#set ($propertyList = ${converter.propertyTagList})
+#foreach( $property in $propertyList )
+#set ($field = $property.fieldName)
+#set ($type = $utils.getJspPropertyType12($property))
+ 
+    private $type $field;
+    
+#set ($var = $utils.getVariableFromName($property.name))
+    public void $utils.getPrefixedPropertyName("set", $property.jspName)($type $var)
+    {
+        $field = $var;
+    }
+#end
+
+    public void setPageContext(PageContext context) {
+        super.setPageContext(context);
+        setConverterIdString("$converter.converterId");
+    }
+
+    protected Converter createConverter() throws JspException {
+    
+        ELContext elContext = FacesContext.getCurrentInstance().getELContext();            
+        $converter.className converter = ($converter.className)super.createConverter();
+#foreach( $property in $propertyList )
+#set ($field = $property.fieldName)
+#set ($type = $utils.getJspPropertyType12($property))
+#set ($className = $utils.getPrimitiveType($property.className))
+        if ($field != null)
+        {
+            if (${field}.isLiteralText())
+            {
+#if ($utils.isPrimitiveClass($property.className))
+                String ${field}Value = ${field}.getExpressionString();
+                if (${field}Value != null)
+                    converter.${utils.getPrefixedPropertyName("set",$property.name)}(${utils.getBoxedClass($className)}.valueOf(${field}Value).${property.className}Value());
+#elseif ($utils.isPrimitiveClass($className))
+                String ${field}Value = ${field}.getExpressionString();
+                if (${field}Value != null)
+                    converter.${utils.getPrefixedPropertyName("set",$property.name)}(${utils.getBoxedClass($className)}.valueOf(${field}Value));
+                else
+                    converter.${utils.getPrefixedPropertyName("set",$property.name)}(null);
+#elseif ($utils.getClassFromFullClass($property.className) == "String")
+                converter.${utils.getPrefixedPropertyName("set",$property.name)}(${field}.getExpressionString());
+#elseif ($utils.getClassFromFullClass($property.className) == "Object")
+                converter.${utils.getPrefixedPropertyName("set",$property.name)}(${field}.getExpressionString());
+#elseif ($utils.getClassFromFullClass($property.className) == "Locale")
+                converter.${utils.getPrefixedPropertyName("set",$property.name)}(
+                    org.apache.myfaces.shared_tomahawk.util.LocaleUtils.converterTagLocaleFromString(${field}.getExpressionString()));
+#elseif ($utils.getClassFromFullClass($property.className) == "Class")
+                try
+                {
+                    converter.${utils.getPrefixedPropertyName("set",$property.name)}(
+                    org.apache.myfaces.shared_tomahawk.util.ClassUtils.classForName(${field}.getExpressionString()));
+                }
+                catch (ClassNotFoundException e)
+                {
+                    throw new JspException(e);
+                }
+#elseif ($utils.getClassFromFullClass($property.className) == "TimeZone")
+                converter.${utils.getPrefixedPropertyName("set",$property.name)}(
+                    java.util.TimeZone.getTimeZone(${field}.getExpressionString()));                
+#else
+                converter.${utils.getPrefixedPropertyName("set",$property.name)}(($property.className) ${field}.getValue(elContext));
+#end
+            }
+            else
+            {
+#if ($utils.isPrimitiveClass($property.className))
+                Object ${field}Value = ${field}.getValue(elContext);
+                if (${field}Value != null)
+                    converter.${utils.getPrefixedPropertyName("set",$property.name)}( ((${utils.getBoxedClass($className)}) ${field}Value ).${property.className}Value());
+#elseif ($utils.isPrimitiveClass($className))
+                converter.${utils.getPrefixedPropertyName("set",$property.name)}( (${utils.getBoxedClass($className)}) ${field}.getValue(elContext) );
+#elseif ($utils.getClassFromFullClass($property.className) == "Locale")
+                Object ${field}Value = ${field}.getValue(elContext);
+                if (${field}Value == null)
+                {
+                    ${field}Value = FacesContext.getCurrentInstance().getViewRoot().getLocale();                
+                }
+                if(!(${field}Value instanceof java.util.Locale))
+                {
+                    ${field}Value = org.apache.myfaces.shared_tomahawk.util.LocaleUtils.converterTagLocaleFromString(${field}.getExpressionString());                    
+                }
+                converter.${utils.getPrefixedPropertyName("set",$property.name)}((java.util.Locale)${field}Value);                
+#elseif ($utils.getClassFromFullClass($property.className) == "TimeZone")
+                Object ${field}Value = ${field}.getValue(elContext);
+                if(${field}Value instanceof java.util.TimeZone)
+                {
+                    converter.${utils.getPrefixedPropertyName("set",$property.name)}(
+                        (java.util.TimeZone) ${field}Value);
+                }
+                else
+                {
+                    converter.${utils.getPrefixedPropertyName("set",$property.name)}(
+                        java.util.TimeZone.getTimeZone(${field}Value.toString()));
+                }
+#elseif ($utils.getClassFromFullClass($property.className) == "String")
+                converter.${utils.getPrefixedPropertyName("set",$property.name)}( (String) ${field}.getValue(elContext));
+#else
+                converter.${utils.getPrefixedPropertyName("set",$property.name)}(($property.className) ${field}.getValue(elContext));
+#end
+            }
+        }
+#end
+        return converter;
+    }
+
+    public void release()
+    {
+        super.release();
+#foreach( $property in $propertyList )
+#set ($field = $property.fieldName)
+#if($utils.getJspPropertyType12($property) == "boolean")
+#set ($empty = "false")
+#else
+#set ($empty = "null")
+#end
+        $field = $empty;
+#end
+    }
+}
\ No newline at end of file

Added: myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/tomahawk12_trunk/sandbox/core12/src/main/resources/META-INF/tagValidatorClass12.vm
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/tomahawk12_trunk/sandbox/core12/src/main/resources/META-INF/tagValidatorClass12.vm?rev=662967&view=auto
==============================================================================
--- myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/tomahawk12_trunk/sandbox/core12/src/main/resources/META-INF/tagValidatorClass12.vm (added)
+++ myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/tomahawk12_trunk/sandbox/core12/src/main/resources/META-INF/tagValidatorClass12.vm Tue Jun  3 20:38:34 2008
@@ -0,0 +1,137 @@
+// WARNING: This file was automatically generated. Do not edit it directly,
+//          or you will lose your changes.
+/*
+ *  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.
+ */
+package $utils.getPackageFromFullClass($validator.tagClass);
+
+import javax.faces.context.FacesContext;
+import javax.el.ValueExpression;
+import javax.faces.validator.Validator;
+import javax.faces.application.Application;
+import javax.servlet.jsp.JspException;
+$utils.importTagClasses($validator)
+
+public class $utils.getClassFromFullClass($validator.tagClass)
+#if (${validator.tagSuperclass})
+    extends ${validator.tagSuperclass}
+#else
+    extends javax.faces.webapp.ValidatorELTag;
+#end
+{
+#if ($validator.serialuidtag)
+    private static final long serialVersionUID = ${validator.serialuidtag}; 
+#end  
+
+    public $utils.getClassFromFullClass($validator.tagClass)()
+    {    
+    }    
+#set ($propertyList = ${validator.propertyTagList})
+#foreach( $property in $propertyList )
+#set ($field = $property.fieldName)
+#set ($type = $utils.getJspPropertyType12($property))
+ 
+    private $type $field;
+    
+#set ($var = $utils.getVariableFromName($property.name))
+    public void $utils.getPrefixedPropertyName("set", $property.jspName)($type $var)
+    {
+        $field = $var;
+    }
+#end
+
+    protected Validator createValidator() throws JspException {
+        String validatorId = "$validator.validatorId";
+        Application appl = FacesContext.getCurrentInstance().getApplication();
+        Validator validator = (Validator)appl.createValidator(validatorId);
+        _setProperties(validator);
+        return validator;
+    }
+    
+    protected void _setProperties(Validator val) throws JspException {
+        super._setProperties(val);    
+        FacesContext facesContext = FacesContext.getCurrentInstance();
+
+        $validator.className validator = ($validator.className) val;
+#foreach( $property in $propertyList )
+#set ($field = $property.fieldName)
+#set ($type = $utils.getJspPropertyType12($property))
+#set ($className = $utils.getPrimitiveType($property.className))
+        if ($field != null)
+        {
+            if (!${field}.isLiteralText())
+            {
+                validator.setValueExpression("$property.name", $field);
+            }
+            else
+            {
+#if ($utils.isPrimitiveClass($property.className))
+                Object ${field}Value = ${field}.getValue(facesContext.getELContext());
+                if (${field}Value != null){
+                    if (${field}Value instanceof ${utils.getBoxedClass($className)}){
+                        validator.${utils.getPrefixedPropertyName("set",$property.name)}(
+                            ((${utils.getBoxedClass($className)})${field}Value).${property.className}Value());                        
+                    }
+                    else
+                    {
+                        validator.${utils.getPrefixedPropertyName("set",$property.name)}(
+                            ${utils.getBoxedClass($className)}.valueOf(${field}Value.toString()).${property.className}Value());
+                    }                    
+                }
+#elseif ($utils.isPrimitiveClass($className))
+                Object ${field}Value = ${field}.getValue(facesContext.getELContext());
+                if (${field}Value != null){
+                    if (${field}Value instanceof ${utils.getBoxedClass($className)}){
+                        validator.${utils.getPrefixedPropertyName("set",$property.name)}(
+                            ((${utils.getBoxedClass($className)})${field}Value));                        
+                    }
+                    else
+                    {
+                        validator.${utils.getPrefixedPropertyName("set",$property.name)}(
+                            ${utils.getBoxedClass($className)}.valueOf(${field}Value.toString()));
+                    }                    
+                }
+#elseif ($utils.getClassFromFullClass($property.className) == "String")
+                Object ${field}Value = ${field}.getValue(facesContext.getELContext());
+                if (${field}Value != null)
+                {
+                    validator.${utils.getPrefixedPropertyName("set",$property.name)}(
+                        ($property.className)  ${field}Value.toString());                
+                }
+#else
+                validator.${utils.getPrefixedPropertyName("set",$property.name)}(($property.className)  ${field}.getValue(facesContext.getELContext()));
+#end
+            }
+        }
+#end
+    }
+
+    public void release()
+    {
+        super.release();
+#foreach( $property in $propertyList )
+#set ($field = $property.fieldName)
+#if($utils.getJspPropertyType12($property) == "boolean")
+#set ($empty = "false")
+#else
+#set ($empty = "null")
+#end
+        $field = $empty;
+#end
+    }
+}

Added: myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/tomahawk12_trunk/sandbox/core12/src/main/resources/META-INF/tomahawk12.vm
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/tomahawk12_trunk/sandbox/core12/src/main/resources/META-INF/tomahawk12.vm?rev=662967&view=auto
==============================================================================
--- myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/tomahawk12_trunk/sandbox/core12/src/main/resources/META-INF/tomahawk12.vm (added)
+++ myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/tomahawk12_trunk/sandbox/core12/src/main/resources/META-INF/tomahawk12.vm Tue Jun  3 20:38:34 2008
@@ -0,0 +1,225 @@
+<?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>
\ No newline at end of file