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/11 02:13:18 UTC
svn commit: r666398 [2/2] - in /myfaces/tomahawk/trunk: ./ core/
core/src/main/conf/META-INF/
core/src/main/java/org/apache/myfaces/custom/aliasbean/
core/src/main/java/org/apache/myfaces/custom/schedule/
core/src/main/java/org/apache/myfaces/custom/ta...
Added: myfaces/tomahawk/trunk/sandbox/core12/src/main/conf/META-INF/facelets-taglib-base.xml
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core12/src/main/conf/META-INF/facelets-taglib-base.xml?rev=666398&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core12/src/main/conf/META-INF/facelets-taglib-base.xml (added)
+++ myfaces/tomahawk/trunk/sandbox/core12/src/main/conf/META-INF/facelets-taglib-base.xml Tue Jun 10 17:13:17 2008
@@ -0,0 +1,24 @@
+<?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.
+-->
+<!DOCTYPE facelet-taglib
+ PUBLIC "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN" "http://java.sun.com/dtd/facelet-taglib_1_0.dtd">
+<facelet-taglib xmlns="http://java.sun.com/JSF/Facelet">
+
+</facelet-taglib>
\ No newline at end of file
Propchange: myfaces/tomahawk/trunk/sandbox/core12/src/main/conf/META-INF/facelets-taglib-base.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/tomahawk/trunk/sandbox/core12/src/main/conf/META-INF/facelets-taglib-base.xml
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: myfaces/tomahawk/trunk/sandbox/core12/src/main/java/org/apache/myfaces/custom/ajaxchildcombobox/AjaxChildComboBoxTagHandler.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core12/src/main/java/org/apache/myfaces/custom/ajaxchildcombobox/AjaxChildComboBoxTagHandler.java?rev=666398&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core12/src/main/java/org/apache/myfaces/custom/ajaxchildcombobox/AjaxChildComboBoxTagHandler.java (added)
+++ myfaces/tomahawk/trunk/sandbox/core12/src/main/java/org/apache/myfaces/custom/ajaxchildcombobox/AjaxChildComboBoxTagHandler.java Tue Jun 10 17:13:17 2008
@@ -0,0 +1,61 @@
+/*
+ * 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 org.apache.myfaces.custom.ajaxchildcombobox;
+
+import javax.el.MethodExpression;
+import javax.faces.application.Application;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.jsf.ComponentConfig;
+import com.sun.facelets.tag.jsf.html.HtmlComponentHandler;
+
+public class AjaxChildComboBoxTagHandler extends HtmlComponentHandler {
+
+ private static final String AJAX_SELECT_ITEMS_METHOD = "ajaxSelectItemsMethod";
+
+ private static final Class [] ajaxSelectItemsMethodParamList = new Class[]{String.class};
+
+ private TagAttribute ajaxSelectItemsMethodAttr;
+
+ public AjaxChildComboBoxTagHandler(ComponentConfig tagConfig) {
+ super(tagConfig);
+ ajaxSelectItemsMethodAttr = getAttribute(AJAX_SELECT_ITEMS_METHOD);
+ }
+
+ protected void setAttributes(FaceletContext ctx, Object instance)
+ {
+ super.setAttributes(ctx, instance);
+
+ Application app = ctx.getFacesContext().getApplication();
+
+ AjaxChildComboBox comp = (AjaxChildComboBox) instance;
+
+ if (ajaxSelectItemsMethodAttr != null){
+ String _ajaxSelectItemsMethod = ajaxSelectItemsMethodAttr.getValue();
+ if (_ajaxSelectItemsMethod != null)
+ {
+ MethodExpression mb = app.getExpressionFactory().createMethodExpression(
+ ctx.getFacesContext().getELContext(),
+ _ajaxSelectItemsMethod,javax.faces.model.SelectItem[].class, ajaxSelectItemsMethodParamList);
+ comp.setAjaxSelectItemsMethod(mb);
+ }
+ }
+ }
+}
Propchange: myfaces/tomahawk/trunk/sandbox/core12/src/main/java/org/apache/myfaces/custom/ajaxchildcombobox/AjaxChildComboBoxTagHandler.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/tomahawk/trunk/sandbox/core12/src/main/java/org/apache/myfaces/custom/ajaxchildcombobox/AjaxChildComboBoxTagHandler.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: myfaces/tomahawk/trunk/sandbox/core12/src/main/resources/META-INF/facelets-taglib.vm
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core12/src/main/resources/META-INF/facelets-taglib.vm?rev=666398&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core12/src/main/resources/META-INF/facelets-taglib.vm (added)
+++ myfaces/tomahawk/trunk/sandbox/core12/src/main/resources/META-INF/facelets-taglib.vm Tue Jun 10 17:13:17 2008
@@ -0,0 +1,95 @@
+<?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.
+-->
+<!DOCTYPE facelet-taglib
+ PUBLIC "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN" "http://java.sun.com/dtd/facelet-taglib_1_0.dtd">
+<facelet-taglib xmlns="http://java.sun.com/JSF/Facelet">
+
+ <namespace>$uri</namespace>
+
+ <!-- Component Tags -->
+#set ($componentList = ${model.getComponents()})
+#foreach( $component in $componentList )
+#if ($modelIds.contains($component.modelId)
+ && ($component.name))
+#if (!$component.isConfigExcluded())
+ <tag>
+ <tag-name>$utils.getTagName($component.name)</tag-name>
+ <component>
+ <component-type>$component.type</component-type>
+#if ($component.rendererType)
+#if (!($component.rendererType == ""))
+ <renderer-type>$component.rendererType</renderer-type>
+#end
+#end
+#if ($component.tagHandler)
+ <handler-class>$component.tagHandler</handler-class>
+#end
+ </component>
+ </tag>
+#end
+#end
+#end
+
+ <!-- Converter tags -->
+#set ($componentList = ${model.getConverters()})
+#foreach( $component in $componentList )
+#if ($modelIds.contains($component.modelId)
+ && ($component.name))
+#if ($converter.converterId)
+ <tag>
+ <tag-name>$utils.getTagName($component.name)</tag-name>
+ <converter>
+ <converter-id>$converter.converterId</converter-id>
+ </converter>
+ </tag>
+#end
+#end
+#end
+
+ <!-- Validator tags -->
+#set ($componentList = ${model.getValidators()})
+#foreach( $component in $componentList )
+#if ($modelIds.contains($component.modelId)
+ && ($component.name))
+#if ($component.validatorId)
+ <tag>
+ <tag-name>$utils.getTagName($component.name)</tag-name>
+ <validator>
+ <validator-id>$component.validatorId</validator-id>
+ </validator>
+ </tag>
+#end
+#end
+#end
+
+ <!-- Single Tags -->
+#set ($tagList = $model.getTags())
+#foreach( $tag in $tagList )
+#if ($modelIds.contains($tag.modelId))
+#if ($tag.tagHandler)
+ <tag>
+ <tag-name>$utils.getTagName($tag.name)</tag-name>
+ <handler-class>$tag.tagHandler</handler-class>
+ </tag>
+#end
+#end
+#end
+
+</facelet-taglib>
\ No newline at end of file
Modified: myfaces/tomahawk/trunk/sandbox/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/pom.xml?rev=666398&r1=666397&r2=666398&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/pom.xml (original)
+++ myfaces/tomahawk/trunk/sandbox/pom.xml Tue Jun 10 17:13:17 2008
@@ -22,6 +22,7 @@
<modules>
<module>core</module>
+ <module>core12</module>
<module>examples</module>
</modules>