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/04/18 09:00:31 UTC
svn commit: r649387 - in
/myfaces/myfaces-build-tools/branches/builder_plugin:
bigtest/core_trunk_11/api/src/main/java/javax/faces/component/
bigtest/core_trunk_11/impl/
bigtest/core_trunk_11/impl/src/main/conf/META-INF/
bigtest/core_trunk_11/impl/src/...
Author: lu4242
Date: Fri Apr 18 00:00:16 2008
New Revision: 649387
URL: http://svn.apache.org/viewvc?rev=649387&view=rev
Log:
Generation of .tld
Added:
myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/core_trunk_11/impl/src/main/conf/META-INF/myfaces_html-base.tld (with props)
myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/core_trunk_11/impl/src/main/resources/META-INF/myfaces_html.vm
Modified:
myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/core_trunk_11/api/src/main/java/javax/faces/component/UIData.java
myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/core_trunk_11/impl/pom.xml
myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/core_trunk_11/impl/src/main/resources/META-INF/faces-config11.vm
myfaces/myfaces-build-tools/branches/builder_plugin/myfaces-builder-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/builder/MakeConfigMojo.java
myfaces/myfaces-build-tools/branches/builder_plugin/myfaces-builder-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/builder/utils/MyfacesUtils.java
Modified: myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/core_trunk_11/api/src/main/java/javax/faces/component/UIData.java
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/core_trunk_11/api/src/main/java/javax/faces/component/UIData.java?rev=649387&r1=649386&r2=649387&view=diff
==============================================================================
--- myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/core_trunk_11/api/src/main/java/javax/faces/component/UIData.java (original)
+++ myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/core_trunk_11/api/src/main/java/javax/faces/component/UIData.java Fri Apr 18 00:00:16 2008
@@ -447,6 +447,7 @@
/**
* @JSFProperty
* literalOnly = "true"
+ * required = "true"
*/
public String getVar()
{
Modified: myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/core_trunk_11/impl/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/core_trunk_11/impl/pom.xml?rev=649387&r1=649386&r2=649387&view=diff
==============================================================================
--- myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/core_trunk_11/impl/pom.xml (original)
+++ myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/core_trunk_11/impl/pom.xml Fri Apr 18 00:00:16 2008
@@ -21,6 +21,9 @@
<resources>
<resource>
<directory>src/main/resources</directory>
+ <excludes>
+ <exclude>**/*.vm</exclude>
+ </excludes>
</resource>
<resource>
<directory>src/main/resources-facesconfig</directory>
@@ -63,6 +66,21 @@
<goal>make-config</goal>
</goals>
</execution>
+ <execution>
+ <id>makehtmltld</id>
+ <configuration>
+ <xmlFile>classes/META-INF/myfaces_html_gen.tld</xmlFile>
+ <xmlBaseFile>src/main/conf/META-INF/myfaces_html-base.tld</xmlBaseFile>
+ <templateFile>myfaces_html.vm</templateFile>
+
+ <modelIds>
+ <modelId>myfaces-api</modelId>
+ </modelIds>
+ </configuration>
+ <goals>
+ <goal>make-config</goal>
+ </goals>
+ </execution>
</executions>
</plugin>
<plugin>
Added: myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/core_trunk_11/impl/src/main/conf/META-INF/myfaces_html-base.tld
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/core_trunk_11/impl/src/main/conf/META-INF/myfaces_html-base.tld?rev=649387&view=auto
==============================================================================
--- myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/core_trunk_11/impl/src/main/conf/META-INF/myfaces_html-base.tld (added)
+++ myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/core_trunk_11/impl/src/main/conf/META-INF/myfaces_html-base.tld Fri Apr 18 00:00:16 2008
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ * 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.
+-->
+<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
+<taglib xmlns="http://java.sun.com/JSP/TagLibraryDescriptor">
+ <tlib-version>1.0</tlib-version>
+ <jsp-version>1.2</jsp-version>
+ <short-name>h</short-name>
+ <uri>http://java.sun.com/jsf/html</uri>
+ <display-name>JSF HTML tag library.</display-name>
+ <description>
+ This tag library implements the standard JSF HTML tags.
+ </description>
+
+</taglib>
\ No newline at end of file
Propchange: myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/core_trunk_11/impl/src/main/conf/META-INF/myfaces_html-base.tld
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/core_trunk_11/impl/src/main/conf/META-INF/myfaces_html-base.tld
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/core_trunk_11/impl/src/main/resources/META-INF/faces-config11.vm
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/core_trunk_11/impl/src/main/resources/META-INF/faces-config11.vm?rev=649387&r1=649386&r2=649387&view=diff
==============================================================================
--- myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/core_trunk_11/impl/src/main/resources/META-INF/faces-config11.vm (original)
+++ myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/core_trunk_11/impl/src/main/resources/META-INF/faces-config11.vm Fri Apr 18 00:00:16 2008
@@ -30,7 +30,7 @@
#set ($componentList = ${model.getComponents()})
#foreach( $component in $componentList )
#if ($modelIds.contains($component.modelId)
- && !($component.name.contains("UIComponent")))
+ && !($component.className.contains("UIComponent")))
<component>
<component-type>$component.type</component-type>
<component-class>$component.className</component-class>
Added: myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/core_trunk_11/impl/src/main/resources/META-INF/myfaces_html.vm
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/core_trunk_11/impl/src/main/resources/META-INF/myfaces_html.vm?rev=649387&view=auto
==============================================================================
--- myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/core_trunk_11/impl/src/main/resources/META-INF/myfaces_html.vm (added)
+++ myfaces/myfaces-build-tools/branches/builder_plugin/bigtest/core_trunk_11/impl/src/main/resources/META-INF/myfaces_html.vm Fri Apr 18 00:00:16 2008
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ * 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.
+-->
+<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
+<taglib xmlns="http://java.sun.com/JSP/TagLibraryDescriptor">
+
+$baseContent
+
+#set ($componentList = ${model.getComponents()})
+#foreach( $component in $componentList )
+#if ($modelIds.contains($component.modelId)
+ && ($component.name))
+#if ($utils.getTagPrefix($component.name) == "h")
+ <tag>
+ <name>$utils.getTagName($component.name)</name>
+ <tag-class>$component.tagClass</tag-class>
+ <body-content>JSP</body-content>
+ <description></description>
+
+#set ($propertyList = ${component.propertyList})
+#foreach( $property in $propertyList )
+#if (!$property.tagExcluded)
+ <attribute>
+ <name>$property.name</name>
+ <required>$property.isRequired()</required>
+ <rtexprvalue>false</rtexprvalue>
+ <type>java.lang.String</type>
+ <description></description>
+ </attribute>
+#end
+#end
+ </tag>
+#end
+#end
+#end
+</taglib>
\ No newline at end of file
Modified: myfaces/myfaces-build-tools/branches/builder_plugin/myfaces-builder-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/builder/MakeConfigMojo.java
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/branches/builder_plugin/myfaces-builder-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/builder/MakeConfigMojo.java?rev=649387&r1=649386&r2=649387&view=diff
==============================================================================
--- myfaces/myfaces-build-tools/branches/builder_plugin/myfaces-builder-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/builder/MakeConfigMojo.java (original)
+++ myfaces/myfaces-build-tools/branches/builder_plugin/myfaces-builder-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/builder/MakeConfigMojo.java Fri Apr 18 00:00:16 2008
@@ -177,6 +177,7 @@
for (int i = 0; i< children.length; i++){
Xpp3Dom dom = children[i];
Xpp3DomWriter.write(writer, dom);
+ writer.write('\n');
}
baseContent = writer.toString();
writer.close();
Modified: myfaces/myfaces-build-tools/branches/builder_plugin/myfaces-builder-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/builder/utils/MyfacesUtils.java
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/branches/builder_plugin/myfaces-builder-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/builder/utils/MyfacesUtils.java?rev=649387&r1=649386&r2=649387&view=diff
==============================================================================
--- myfaces/myfaces-build-tools/branches/builder_plugin/myfaces-builder-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/builder/utils/MyfacesUtils.java (original)
+++ myfaces/myfaces-build-tools/branches/builder_plugin/myfaces-builder-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/builder/utils/MyfacesUtils.java Fri Apr 18 00:00:16 2008
@@ -43,6 +43,22 @@
return prefix + Character.toUpperCase(propertyName.charAt(0))
+ propertyName.substring(1);
}
+
+ /**
+ * Convert h:commandButton to commandButton
+ *
+ * @param prefixedName
+ * @return
+ */
+ public static String getTagName(String prefixedName)
+ {
+ return prefixedName.substring(prefixedName.indexOf(':')+1);
+ }
+
+ public static String getTagPrefix(String prefixedName)
+ {
+ return prefixedName.substring(0,prefixedName.indexOf(':'));
+ }
public static String getJspPropertyType11(PropertyMeta property)
{
@@ -54,6 +70,18 @@
return "String";
}
+
+ public static String getFullJspPropertyType11(PropertyMeta property)
+ {
+ if (property.isMethodExpression())
+ return "javax.faces.el.MethodBinding";
+
+ if (property.isMethodBinding())
+ return "javax.faces.el.MethodBinding";
+
+ return "java.lang.String";
+ }
+
public static String getJspPropertyType12(PropertyMeta property)
{
Re: svn commit: r649387
Posted by "simon.kitching@chello.at" <si...@chello.at>.
Hi Lenonardo,
lu4242@apache.org schrieb:
> Author: lu4242
> Date: Fri Apr 18 00:00:16 2008
> New Revision: 649387
>
> URL: http://svn.apache.org/viewvc?rev=649387&view=rev
> Log:
> Generation of .tld
>
I just wanted to say I really appreciate all the work you're putting
into this.
I'm back from holiday but still don't have much spare time to hack on
this until after next weekend. However I have been trying to keep up
with all the commits. It's looking really good - and pretty close to
done! I particularly like the velocity scripts; understanding and
changing the generated output (if needed) should be quite easy.
Regards,
Simon