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 [1/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...

Author: lu4242
Date: Tue Jun 10 17:13:17 2008
New Revision: 666398

URL: http://svn.apache.org/viewvc?rev=666398&view=rev
Log:
TOMAHAWK-1146 Include Complete and Correct Taglib file for Facelets

Added:
    myfaces/tomahawk/trunk/core/src/main/conf/META-INF/facelets-taglib-base.xml   (with props)
    myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBeanTagHandler.java   (with props)
    myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBeansScopeTagHandler.java   (with props)
    myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/schedule/ScheduleTagHandler.java   (with props)
    myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/HtmlPanelTabbedPaneTagHandler.java   (with props)
    myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/TabChangeListenerTagHandler.java   (with props)
    myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tree/taglib/IconProviderTagHandler.java   (with props)
    myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tree/taglib/TreeSelectionListenerTagHandler.java   (with props)
    myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tree/taglib/TreeTagHandler.java   (with props)
    myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/updateactionlistener/UpdateActionListenerTagHandler.java   (with props)
    myfaces/tomahawk/trunk/core/src/main/resources/META-INF/facelets-taglib.vm
    myfaces/tomahawk/trunk/core12/src/main/conf/META-INF/facelets-taglib-base.xml   (with props)
    myfaces/tomahawk/trunk/core12/src/main/resources/META-INF/facelets-taglib.vm
    myfaces/tomahawk/trunk/sandbox/core/src/main/conf/META-INF/facelets-taglib-base.xml   (with props)
    myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/ajaxchildcombobox/AjaxChildComboBoxTagHandler.java   (with props)
    myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/suggestajax/inputsuggestajax/InputSuggestAjaxTagHandler.java   (with props)
    myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/suggestajax/tablesuggestajax/TableSuggestAjaxTagHandler.java   (with props)
    myfaces/tomahawk/trunk/sandbox/core/src/main/resources/META-INF/facelets-taglib.vm
    myfaces/tomahawk/trunk/sandbox/core12/src/main/conf/META-INF/facelets-taglib-base.xml   (with props)
    myfaces/tomahawk/trunk/sandbox/core12/src/main/java/org/apache/myfaces/custom/ajaxchildcombobox/AjaxChildComboBoxTagHandler.java   (with props)
    myfaces/tomahawk/trunk/sandbox/core12/src/main/resources/META-INF/facelets-taglib.vm
Modified:
    myfaces/tomahawk/trunk/core/pom.xml
    myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBean.java
    myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBeansScope.java
    myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/schedule/AbstractHtmlSchedule.java
    myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/AbstractHtmlPanelTabbedPane.java
    myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/TabChangeListenerTag.java
    myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tree/HtmlTree.java
    myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tree/taglib/IconProviderTag.java
    myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tree/taglib/TreeSelectionListenerTag.java
    myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/updateactionlistener/UpdateActionListenerTag.java
    myfaces/tomahawk/trunk/core12/pom.xml
    myfaces/tomahawk/trunk/pom.xml
    myfaces/tomahawk/trunk/sandbox/core/pom.xml
    myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/ajaxchildcombobox/AbstractAjaxChildComboBox.java
    myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/suggestajax/inputsuggestajax/AbstractInputSuggestAjax.java
    myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/suggestajax/tablesuggestajax/AbstractTableSuggestAjax.java
    myfaces/tomahawk/trunk/sandbox/core12/pom.xml
    myfaces/tomahawk/trunk/sandbox/pom.xml

Modified: myfaces/tomahawk/trunk/core/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/pom.xml?rev=666398&r1=666397&r2=666398&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/pom.xml (original)
+++ myfaces/tomahawk/trunk/core/pom.xml Tue Jun 10 17:13:17 2008
@@ -139,6 +139,12 @@
       <scope>provided</scope>
     </dependency>
     
+    <dependency>
+      <groupId>com.sun.facelets</groupId>
+      <artifactId>jsf-facelets</artifactId>
+      <scope>provided</scope>
+    </dependency>
+        
     <!-- Required for wrapper of FacesContext (compatible with 1.2) -->
     <dependency>
       <groupId>javax.el</groupId>
@@ -349,6 +355,24 @@
                 <goal>make-config</goal>
             </goals>
           </execution>        
+          <execution>
+            <id>maketomahawktaglib</id>
+            <configuration>
+                <xmlFile>META-INF/tomahawk.taglib.xml</xmlFile>
+                <xmlBaseFile>src/main/conf/META-INF/facelets-taglib-base.xml</xmlBaseFile>
+                <templateFile>facelets-taglib.vm</templateFile>
+                <params>
+                   <shortname>t</shortname>
+                   <uri>http://myfaces.apache.org/tomahawk</uri>
+                </params>
+                <modelIds>
+                    <modelId>tomahawk</modelId>
+                </modelIds>
+            </configuration>
+            <goals>
+                <goal>make-config</goal>
+            </goals>
+          </execution>        
         </executions>
       </plugin>
       <plugin>

Added: myfaces/tomahawk/trunk/core/src/main/conf/META-INF/facelets-taglib-base.xml
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/conf/META-INF/facelets-taglib-base.xml?rev=666398&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/conf/META-INF/facelets-taglib-base.xml (added)
+++ myfaces/tomahawk/trunk/core/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/core/src/main/conf/META-INF/facelets-taglib-base.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tomahawk/trunk/core/src/main/conf/META-INF/facelets-taglib-base.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBean.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBean.java?rev=666398&r1=666397&r2=666398&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBean.java (original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBean.java Tue Jun 10 17:13:17 2008
@@ -67,6 +67,7 @@
  * @JSFComponent
  *   name = "t:aliasBean"
  *   tagClass = "org.apache.myfaces.custom.aliasbean.AliasBeanTag"
+ *   tagHandler = "org.apache.myfaces.custom.aliasbean.AliasBeanTagHandler"
  * 
  * @JSFJspProperty 
  *   name = "rendered"

Added: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBeanTagHandler.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBeanTagHandler.java?rev=666398&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBeanTagHandler.java (added)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBeanTagHandler.java Tue Jun 10 17:13:17 2008
@@ -0,0 +1,98 @@
+/*
+ * 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.aliasbean;
+
+import java.io.IOException;
+
+import javax.el.ELException;
+import javax.faces.FacesException;
+import javax.faces.application.Application;
+import javax.faces.component.UIComponent;
+import javax.faces.webapp.UIComponentTag;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.jsf.ComponentConfig;
+import com.sun.facelets.tag.jsf.ComponentHandler;
+
+public class AliasBeanTagHandler extends ComponentHandler
+{
+    private TagAttribute valueAttr;
+    private TagAttribute aliasAttr;
+
+    public AliasBeanTagHandler(ComponentConfig tagConfig)
+    {
+        super(tagConfig);
+
+        valueAttr = getRequiredAttribute("value");
+        aliasAttr = getRequiredAttribute("alias");
+    }
+
+    protected void setAttributes(FaceletContext ctx, Object instance)
+    {
+        super.setAttributes(ctx, instance);
+        
+        Application app = ctx.getFacesContext().getApplication();
+        
+        AliasBean aliasBean = (AliasBean) instance;
+
+        String value = valueAttr.getValue();
+        if (UIComponentTag.isValueReference(value))
+        {
+            aliasBean.setValueBinding("value", app.createValueBinding(valueAttr
+                    .getValue()));
+        }
+        else
+        {
+            aliasBean.setValue(value);
+        }
+
+        String alias = aliasAttr.getValue();
+        if (UIComponentTag.isValueReference(alias))
+        {
+            aliasBean.setValueBinding("alias", app.createValueBinding(aliasAttr
+                    .getValue()));
+        }
+        else
+        {
+            aliasBean.setAlias(alias);
+        }
+    }
+    
+    protected void applyNextHandler(FaceletContext ctx, UIComponent component)
+            throws IOException, FacesException, ELException
+    {
+        AliasBean aliasBean = (AliasBean) component;
+        aliasBean.makeAlias(ctx.getFacesContext());
+        super.applyNextHandler(ctx, component);
+        aliasBean.removeAlias(ctx.getFacesContext());
+    }
+    
+    /**
+     * We have to add the children to the parent, for ensure proper
+     * behavior between aliasBean and aliasBeansScope.
+     * 
+     */
+    protected void onComponentCreated(FaceletContext faceletcontext,
+            UIComponent component, UIComponent parent)    
+    {
+        parent.getChildren().add(component);
+    }
+
+}

Propchange: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBeanTagHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBeanTagHandler.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBeansScope.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBeansScope.java?rev=666398&r1=666397&r2=666398&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBeansScope.java (original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBeansScope.java Tue Jun 10 17:13:17 2008
@@ -51,6 +51,7 @@
  * @JSFComponent
  *   name = "t:aliasBeansScope"
  *   tagClass = "org.apache.myfaces.custom.aliasbean.AliasBeansScopeTag"
+ *   tagHandler = "org.apache.myfaces.custom.aliasbean.AliasBeansScopeTagHandler"
  *   
  * @JSFJspProperty 
  *   name = "rendered"

Added: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBeansScopeTagHandler.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBeansScopeTagHandler.java?rev=666398&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBeansScopeTagHandler.java (added)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBeansScopeTagHandler.java Tue Jun 10 17:13:17 2008
@@ -0,0 +1,47 @@
+/*
+ * 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.aliasbean;
+
+import java.io.IOException;
+
+import javax.el.ELException;
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.jsf.ComponentConfig;
+import com.sun.facelets.tag.jsf.ComponentHandler;
+
+public class AliasBeansScopeTagHandler extends ComponentHandler
+{
+
+    public AliasBeansScopeTagHandler(ComponentConfig tagConfig)
+    {
+        super(tagConfig);
+    }
+    
+    protected void applyNextHandler(FaceletContext ctx, UIComponent c)
+            throws IOException, FacesException, ELException
+    {
+        AliasBeansScope aliasBean = (AliasBeansScope) c;              
+        aliasBean.makeAliases(ctx.getFacesContext());
+        super.applyNextHandler(ctx, c);
+        aliasBean.removeAliases(ctx.getFacesContext());
+    }
+}

Propchange: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBeansScopeTagHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/aliasbean/AliasBeansScopeTagHandler.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/schedule/AbstractHtmlSchedule.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/schedule/AbstractHtmlSchedule.java?rev=666398&r1=666397&r2=666398&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/schedule/AbstractHtmlSchedule.java (original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/schedule/AbstractHtmlSchedule.java Tue Jun 10 17:13:17 2008
@@ -32,6 +32,7 @@
  *   name = "t:schedule"
  *   class = "org.apache.myfaces.custom.schedule.HtmlSchedule"
  *   tagClass = "org.apache.myfaces.custom.schedule.ScheduleTag"
+ *   tagHandler = "org.apache.myfaces.custom.schedule.ScheduleTagHandler"
  *   implements = "java.io.Serializable"
  *   serialuid = "5859593107442371656L"
  *

Added: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/schedule/ScheduleTagHandler.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/schedule/ScheduleTagHandler.java?rev=666398&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/schedule/ScheduleTagHandler.java (added)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/schedule/ScheduleTagHandler.java Tue Jun 10 17:13:17 2008
@@ -0,0 +1,43 @@
+/*
+ * 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.schedule;
+
+import com.sun.facelets.tag.MetaRuleset;
+import com.sun.facelets.tag.MethodRule;
+import com.sun.facelets.tag.jsf.ComponentConfig;
+import com.sun.facelets.tag.jsf.html.HtmlComponentHandler;
+
+public class ScheduleTagHandler extends HtmlComponentHandler {
+ 
+    private static final String MOUSE_LISTENER = "mouseListener";
+    
+    private static final Class [] mouseListenerParamList = new Class[]{ScheduleMouseEvent.class}; 
+
+    public ScheduleTagHandler(ComponentConfig tagConfig) {
+        super(tagConfig);
+    }
+
+    protected MetaRuleset createMetaRuleset(Class type)
+    {       
+        return super.createMetaRuleset(type).addRule(
+                new MethodRule(MOUSE_LISTENER, 
+                        String.class, mouseListenerParamList));
+    }
+
+ }
\ No newline at end of file

Propchange: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/schedule/ScheduleTagHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/schedule/ScheduleTagHandler.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/AbstractHtmlPanelTabbedPane.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/AbstractHtmlPanelTabbedPane.java?rev=666398&r1=666397&r2=666398&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/AbstractHtmlPanelTabbedPane.java (original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/AbstractHtmlPanelTabbedPane.java Tue Jun 10 17:13:17 2008
@@ -47,6 +47,7 @@
  *   name = "t:panelTabbedPane"
  *   class = "org.apache.myfaces.custom.tabbedpane.HtmlPanelTabbedPane"
  *   tagClass = "org.apache.myfaces.custom.tabbedpane.HtmlPanelTabbedPaneTag"
+ *   tagHandler = "org.apache.myfaces.custom.tabbedpane.HtmlPanelTabbedPaneTagHandler"
  * 
  * @author Manfred Geiler (latest modification by $Author$)
  * @version $Revision$ $Date$
@@ -169,6 +170,17 @@
         removeFacesListener(listener);
     }
 
+    /**
+     * TODO: This should be something like this:
+     * 
+     * JSFProperty
+     *   returnSignature = "void"
+     *   methodSignature = "org.apache.myfaces.custom.tabbedpane.TabChangeEvent"
+     * 
+     * And be added on tld. But you can do the same with TabChangeListenerTag. 
+     * 
+     * @return
+     */
     public MethodBinding getTabChangeListener()
     {
         return _tabChangeListener;

Added: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/HtmlPanelTabbedPaneTagHandler.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/HtmlPanelTabbedPaneTagHandler.java?rev=666398&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/HtmlPanelTabbedPaneTagHandler.java (added)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/HtmlPanelTabbedPaneTagHandler.java Tue Jun 10 17:13:17 2008
@@ -0,0 +1,44 @@
+/*
+ * 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.tabbedpane;
+
+import com.sun.facelets.tag.MetaRuleset;
+import com.sun.facelets.tag.MethodRule;
+import com.sun.facelets.tag.jsf.ComponentConfig;
+import com.sun.facelets.tag.jsf.ComponentHandler;
+
+public class HtmlPanelTabbedPaneTagHandler extends ComponentHandler
+{
+    static final String METHOD_BINDING_ATTR_NAME = "tabChangeListener";
+    static final Class[] METHOD_BINDING_SIGNATURE = { TabChangeEvent.class };
+
+    protected final static MethodRule actionListenerTagRule = new MethodRule(
+            METHOD_BINDING_ATTR_NAME, void.class, METHOD_BINDING_SIGNATURE);
+
+    public HtmlPanelTabbedPaneTagHandler(ComponentConfig config)
+    {
+        super(config);
+    }
+
+    protected MetaRuleset createMetaRuleset(Class type)
+    {
+        return super.createMetaRuleset(type).addRule(actionListenerTagRule);
+    }
+
+}
\ No newline at end of file

Propchange: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/HtmlPanelTabbedPaneTagHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/HtmlPanelTabbedPaneTagHandler.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/TabChangeListenerTag.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/TabChangeListenerTag.java?rev=666398&r1=666397&r2=666398&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/TabChangeListenerTag.java (original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/TabChangeListenerTag.java Tue Jun 10 17:13:17 2008
@@ -35,6 +35,7 @@
  * @JSFJspTag
  *   name="t:tabChangeListener"
  *   bodyContent="empty"
+ *   tagHandler = "org.apache.myfaces.custom.tabbedpane.TabChangeListenerTagHandler"
  *   
  * @author <a href="mailto:oliver@rossmueller.com">Oliver Rossmueller</a>
  * @version $Revision$ $Date$

Added: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/TabChangeListenerTagHandler.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/TabChangeListenerTagHandler.java?rev=666398&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/TabChangeListenerTagHandler.java (added)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/TabChangeListenerTagHandler.java Tue Jun 10 17:13:17 2008
@@ -0,0 +1,73 @@
+/*
+ * 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.tabbedpane;
+
+import java.io.IOException;
+
+import javax.el.ELException;
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+
+import org.apache.myfaces.shared_tomahawk.util.ClassUtils;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.FaceletException;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+import com.sun.facelets.tag.TagHandler;
+
+public class TabChangeListenerTagHandler extends TagHandler
+{
+
+    private final TagAttribute typeAttr;
+
+    public TabChangeListenerTagHandler(TagConfig config)
+    {
+        super(config);
+        typeAttr = getRequiredAttribute("type");
+    }
+
+    public void apply(FaceletContext faceletContext, UIComponent parent)
+            throws IOException, FacesException, FaceletException, ELException
+    {
+        if (parent.getParent() == null)
+        {
+            if (parent instanceof HtmlPanelTabbedPane)
+            {
+                String className;
+                if (!typeAttr.isLiteral())
+                {
+                    className = typeAttr.getValue();
+                }
+                else
+                {
+                    className = typeAttr.getValue(faceletContext);
+                }
+                TabChangeListener listener = (TabChangeListener) ClassUtils
+                        .newInstance(className);
+                ((HtmlPanelTabbedPane) parent).addTabChangeListener(listener);
+            }
+            else
+            {
+                throw new FacesException(
+                        "Component is not HtmlPanelTabbedPane children");
+            }
+        }
+    }
+}

Propchange: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/TabChangeListenerTagHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tabbedpane/TabChangeListenerTagHandler.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tree/HtmlTree.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tree/HtmlTree.java?rev=666398&r1=666397&r2=666398&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tree/HtmlTree.java (original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tree/HtmlTree.java Tue Jun 10 17:13:17 2008
@@ -59,6 +59,7 @@
  *   tagClass = "org.apache.myfaces.custom.tree.taglib.TreeTag"
  *   tagSuperclass = "org.apache.myfaces.custom.tree.taglib.AbstractTreeTag"
  *   type = "org.apache.myfaces.HtmlTree"
+ *   tagHandler = "org.apache.myfaces.custom.tree.taglib.TreeTagHandler"
  *
  * @JSFJspProperty name = "headerClass" returnType = "java.lang.String"
  * @JSFJspProperty name = "footerClass" returnType = "java.lang.String"

Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tree/taglib/IconProviderTag.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tree/taglib/IconProviderTag.java?rev=666398&r1=666397&r2=666398&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tree/taglib/IconProviderTag.java (original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tree/taglib/IconProviderTag.java Tue Jun 10 17:13:17 2008
@@ -35,6 +35,7 @@
  * @JSFJspTag
  *   name="t:iconProvider"
  *   bodyContent="empty"
+ *   tagHandler="org.apache.myfaces.custom.tree.taglib.IconProviderTagHandler"
  *   
  * @author <a href="mailto:oliver@rossmueller.com">Oliver Rossmueller</a>
  * @version $Revision$ $Date$

Added: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tree/taglib/IconProviderTagHandler.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tree/taglib/IconProviderTagHandler.java?rev=666398&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tree/taglib/IconProviderTagHandler.java (added)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tree/taglib/IconProviderTagHandler.java Tue Jun 10 17:13:17 2008
@@ -0,0 +1,74 @@
+/*
+ * 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.tree.taglib;
+
+import java.io.IOException;
+
+import javax.el.ELException;
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+
+import org.apache.myfaces.custom.tree.HtmlTree;
+import org.apache.myfaces.custom.tree.IconProvider;
+import org.apache.myfaces.shared_tomahawk.util.ClassUtils;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.FaceletException;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+import com.sun.facelets.tag.TagHandler;
+
+public class IconProviderTagHandler extends TagHandler
+{
+
+    private final TagAttribute typeAttr;
+    
+    public IconProviderTagHandler(TagConfig config)
+    {
+        super(config);
+        typeAttr = getRequiredAttribute("type");
+    }
+
+    public void apply(FaceletContext faceletContext, UIComponent parent)
+            throws IOException, FacesException, FaceletException, ELException
+    {
+        if (parent.getParent() == null)
+        {
+            if (parent instanceof HtmlTree)
+            {
+                String className;
+                if (!typeAttr.isLiteral())
+                {
+                    className = typeAttr.getValue();
+                }
+                else
+                {
+                    className = typeAttr.getValue(faceletContext);
+                }
+                IconProvider provider = (IconProvider) ClassUtils.newInstance(className);
+                ((HtmlTree) parent).setIconProvider(provider);                
+            }
+            else
+            {
+                throw new FacesException(
+                        "Component is not HtmlTree children");
+            }            
+        }
+    }
+}

Propchange: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tree/taglib/IconProviderTagHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tree/taglib/IconProviderTagHandler.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tree/taglib/TreeSelectionListenerTag.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tree/taglib/TreeSelectionListenerTag.java?rev=666398&r1=666397&r2=666398&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tree/taglib/TreeSelectionListenerTag.java (original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tree/taglib/TreeSelectionListenerTag.java Tue Jun 10 17:13:17 2008
@@ -37,6 +37,7 @@
  * @JSFJspTag
  *   name="t:treeSelectionListener"
  *   bodyContent="empty"
+ *   tagHandler="org.apache.myfaces.custom.tree.taglib.TreeSelectionListenerTagHandler"
  *   
  * @author <a href="mailto:oliver@rossmueller.com">Oliver Rossmueller</a>
  * @version $Revision$ $Date$

Added: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tree/taglib/TreeSelectionListenerTagHandler.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tree/taglib/TreeSelectionListenerTagHandler.java?rev=666398&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tree/taglib/TreeSelectionListenerTagHandler.java (added)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tree/taglib/TreeSelectionListenerTagHandler.java Tue Jun 10 17:13:17 2008
@@ -0,0 +1,74 @@
+/*
+ * 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.tree.taglib;
+
+import java.io.IOException;
+
+import javax.el.ELException;
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+
+import org.apache.myfaces.custom.tree.HtmlTree;
+import org.apache.myfaces.custom.tree.event.TreeSelectionListener;
+import org.apache.myfaces.shared_tomahawk.util.ClassUtils;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.FaceletException;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+import com.sun.facelets.tag.TagHandler;
+
+public class TreeSelectionListenerTagHandler extends TagHandler
+{
+
+    private final TagAttribute typeAttr;
+    
+    public TreeSelectionListenerTagHandler(TagConfig config)
+    {
+        super(config);
+        typeAttr = getRequiredAttribute("type");
+    }
+
+    public void apply(FaceletContext faceletContext, UIComponent parent)
+            throws IOException, FacesException, FaceletException, ELException
+    {
+        if (parent.getParent() == null)
+        {
+            if (parent instanceof HtmlTree)
+            {
+                String className;
+                if (!typeAttr.isLiteral())
+                {
+                    className = typeAttr.getValue();
+                }
+                else
+                {
+                    className = typeAttr.getValue(faceletContext);
+                }
+                TreeSelectionListener listener = (TreeSelectionListener) ClassUtils.newInstance(className);
+                ((HtmlTree) parent).addTreeSelectionListener(listener);
+            }
+            else
+            {
+                throw new FacesException(
+                        "Component is not HtmlTree children");
+            }            
+        }
+    }
+}

Propchange: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tree/taglib/TreeSelectionListenerTagHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tree/taglib/TreeSelectionListenerTagHandler.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tree/taglib/TreeTagHandler.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tree/taglib/TreeTagHandler.java?rev=666398&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tree/taglib/TreeTagHandler.java (added)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tree/taglib/TreeTagHandler.java Tue Jun 10 17:13:17 2008
@@ -0,0 +1,120 @@
+/*
+ * 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.tree.taglib;
+
+import javax.faces.application.Application;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+import javax.faces.webapp.UIComponentTag;
+
+import org.apache.myfaces.custom.tree.HtmlTree;
+import org.apache.myfaces.custom.tree.model.DefaultTreeModel;
+import org.apache.myfaces.custom.tree.model.TreeModel;
+import org.apache.myfaces.custom.tree.model.TreePath;
+
+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 TreeTagHandler extends HtmlComponentHandler
+{
+
+    private TagAttribute valueAttr;
+    private TagAttribute expandRootAttr;
+    
+    private boolean expandRoot;
+    
+    public TreeTagHandler(ComponentConfig config)
+    {
+        super(config);
+        valueAttr = getRequiredAttribute("value");
+        expandRootAttr = getRequiredAttribute("expandRoot");
+        expandRoot = false;
+    }
+    
+    protected void setAttributes(FaceletContext ctx, Object instance)
+    {
+        super.setAttributes(ctx, instance);
+        
+        Application app = ctx.getFacesContext().getApplication();
+        
+        HtmlTree tree = (HtmlTree) instance;
+        
+        if(valueAttr != null)
+        {
+            String value = valueAttr.getValue();
+            if (value != null && UIComponentTag.isValueReference(value))
+            {
+                tree.setValueBinding("model", app.createValueBinding(valueAttr
+                        .getValue()));
+            }
+        }
+        else
+        {
+            ValueBinding binding = tree.getValueBinding("model");
+            if (binding == null) {
+                binding = app.createValueBinding("#{sessionScope.tree}");
+            }
+            tree.setValueBinding("model", binding);            
+        }
+        
+        if (expandRootAttr != null)
+        {
+            expandRoot = expandRootAttr.getBoolean(ctx);
+        }
+    }
+    
+    protected void onComponentCreated(FaceletContext ctx,
+            UIComponent component, UIComponent parent)
+    {
+        FacesContext context = ctx.getFacesContext();
+        Application app = ctx.getFacesContext().getApplication();
+        
+        if (valueAttr != null) {
+            String value = valueAttr.getValue();
+            if (value != null){
+                ValueBinding valueBinding = app.createValueBinding(value);
+                TreeModel treeModel = (TreeModel) (valueBinding.getValue(context));
+        
+                if (treeModel == null) {
+                    // create default model
+                    treeModel = new DefaultTreeModel();
+                    valueBinding.setValue(context, treeModel);
+                }
+            }
+        }
+        
+        HtmlTree tree = (HtmlTree) component;
+        
+        if (expandRoot)
+        {
+            // component was created, so expand the root node
+            TreeModel model = tree.getModel(context);
+    
+            if (model != null) {
+                tree.expandPath(new TreePath(new Object[] { model.getRoot() }),
+                        context);
+            }
+        }
+        tree.addToModelListeners();
+    }
+    
+}

Propchange: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tree/taglib/TreeTagHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/tree/taglib/TreeTagHandler.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/updateactionlistener/UpdateActionListenerTag.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/updateactionlistener/UpdateActionListenerTag.java?rev=666398&r1=666397&r2=666398&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/updateactionlistener/UpdateActionListenerTag.java (original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/updateactionlistener/UpdateActionListenerTag.java Tue Jun 10 17:13:17 2008
@@ -42,6 +42,7 @@
  * @JSFJspTag
  *   name="t:updateActionListener"
  *   bodyContent="JSP"
+ *   tagHandler="org.apache.myfaces.custom.updateactionlistener.UpdateActionListenerTagHandler"
  *   
  * @author Manfred Geiler (latest modification by $Author$)
  * @version $Revision$ $Date$

Added: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/updateactionlistener/UpdateActionListenerTagHandler.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/updateactionlistener/UpdateActionListenerTagHandler.java?rev=666398&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/updateactionlistener/UpdateActionListenerTagHandler.java (added)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/updateactionlistener/UpdateActionListenerTagHandler.java Tue Jun 10 17:13:17 2008
@@ -0,0 +1,129 @@
+/*
+ * 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.updateactionlistener;
+
+import java.io.IOException;
+
+import javax.el.ELException;
+import javax.faces.FacesException;
+import javax.faces.application.Application;
+import javax.faces.component.ActionSource;
+import javax.faces.component.UIComponent;
+import javax.faces.convert.Converter;
+import javax.faces.event.ActionListener;
+import javax.faces.webapp.UIComponentTag;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.FaceletException;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+import com.sun.facelets.tag.TagHandler;
+import com.sun.facelets.tag.jsf.ComponentConfig;
+
+/**
+ * Tag handler for the Tomahawk UpdateActionListener tag
+ * 
+ * @author arobinson74
+ */
+public class UpdateActionListenerTagHandler extends TagHandler
+{
+    private static Log logger = LogFactory
+            .getLog(UpdateActionListenerTagHandler.class);
+
+    private TagAttribute converterAttr;
+    private TagAttribute propertyAttr;
+    private TagAttribute valueAttr;
+
+    /**
+     * @param config
+     */
+    public UpdateActionListenerTagHandler(ComponentConfig config)
+    {
+        this((TagConfig) config);
+    }
+
+    /**
+     * @param config
+     */
+    public UpdateActionListenerTagHandler(TagConfig config)
+    {
+        super(config);
+        valueAttr = getRequiredAttribute("value");
+        propertyAttr = getRequiredAttribute("property");
+        converterAttr = getAttribute("converter");
+    }
+
+    /**
+     * @see com.sun.facelets.FaceletHandler#apply(com.sun.facelets.FaceletContext, javax.faces.component.UIComponent)
+     */
+    public void apply(FaceletContext ctx, UIComponent parent)
+            throws IOException, FacesException, FaceletException, ELException
+    {
+        logger.debug("Apply called. Component: " + parent);
+        ActionSource actionSource = (ActionSource) parent;
+
+        if (sourceHasProperty(actionSource))
+            return;
+
+        UpdateActionListener al = new UpdateActionListener();
+
+        Application app = ctx.getFacesContext().getApplication();
+        if (converterAttr != null)
+        {
+            Converter converter = app.createConverter(converterAttr
+                    .getValue(ctx));
+            al.setConverter(converter);
+        }
+
+        String value = valueAttr.getValue();
+        if (UIComponentTag.isValueReference(value))
+            al.setValueBinding(app.createValueBinding(valueAttr.getValue()));
+        else
+            al.setValue(value);
+
+        al.setPropertyBinding(app.createValueBinding(propertyAttr.getValue()));
+
+        actionSource.addActionListener(al);
+    }
+
+    private boolean sourceHasProperty(ActionSource source)
+    {
+        ActionListener[] listeners = source.getActionListeners();
+        for (int i = 0; i < listeners.length; i++)
+        {
+            ActionListener listener = listeners[i];
+            if (listener instanceof UpdateActionListener == false)
+                continue;
+            UpdateActionListener al = (UpdateActionListener) listener;
+            if (al.getPropertyBinding().getExpressionString().equals(
+                    this.propertyAttr.getValue()))
+            {
+                logger.debug("Action listener already has a listener for "
+                        + this.propertyAttr.getValue());
+                return true;
+            }
+        }
+        logger.debug("Action listener for property is not present. Property: "
+                + this.propertyAttr.getValue());
+        return false;
+    }
+}

Propchange: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/updateactionlistener/UpdateActionListenerTagHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/updateactionlistener/UpdateActionListenerTagHandler.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: myfaces/tomahawk/trunk/core/src/main/resources/META-INF/facelets-taglib.vm
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/resources/META-INF/facelets-taglib.vm?rev=666398&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/resources/META-INF/facelets-taglib.vm (added)
+++ myfaces/tomahawk/trunk/core/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/core12/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/pom.xml?rev=666398&r1=666397&r2=666398&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core12/pom.xml (original)
+++ myfaces/tomahawk/trunk/core12/pom.xml Tue Jun 10 17:13:17 2008
@@ -148,6 +148,12 @@
       <version>1.0.1-SNAPSHOT</version>
       <scope>provided</scope>
     </dependency>
+
+    <dependency>
+      <groupId>com.sun.facelets</groupId>
+      <artifactId>jsf-facelets</artifactId>
+      <scope>provided</scope>
+    </dependency>
     
     <!-- test dependencies -->
 
@@ -426,7 +432,25 @@
             <goals>
                 <goal>make-config</goal>
             </goals>
-          </execution>        
+          </execution>    
+          <execution>
+            <id>maketomahawktaglib</id>
+            <configuration>
+                <xmlFile>META-INF/tomahawk.taglib.xml</xmlFile>
+                <xmlBaseFile>src/main/conf/META-INF/facelets-taglib-base.xml</xmlBaseFile>
+                <templateFile>facelets-taglib.vm</templateFile>
+                <params>
+                   <shortname>t</shortname>
+                   <uri>http://myfaces.apache.org/tomahawk</uri>
+                </params>
+                <modelIds>
+                    <modelId>tomahawk</modelId>
+                </modelIds>
+            </configuration>
+            <goals>
+                <goal>make-config</goal>
+            </goals>
+          </execution>
         </executions>
       </plugin>
       <plugin>

Added: myfaces/tomahawk/trunk/core12/src/main/conf/META-INF/facelets-taglib-base.xml
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/main/conf/META-INF/facelets-taglib-base.xml?rev=666398&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/main/conf/META-INF/facelets-taglib-base.xml (added)
+++ myfaces/tomahawk/trunk/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/core12/src/main/conf/META-INF/facelets-taglib-base.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tomahawk/trunk/core12/src/main/conf/META-INF/facelets-taglib-base.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: myfaces/tomahawk/trunk/core12/src/main/resources/META-INF/facelets-taglib.vm
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/main/resources/META-INF/facelets-taglib.vm?rev=666398&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/main/resources/META-INF/facelets-taglib.vm (added)
+++ myfaces/tomahawk/trunk/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/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/pom.xml?rev=666398&r1=666397&r2=666398&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/pom.xml (original)
+++ myfaces/tomahawk/trunk/pom.xml Tue Jun 10 17:13:17 2008
@@ -49,6 +49,14 @@
         <artifactId>myfaces-shared-tomahawk</artifactId>
         <version>${myfaces-shared.version}</version>
       </dependency>
+
+      <dependency>
+        <groupId>com.sun.facelets</groupId>
+        <artifactId>jsf-facelets</artifactId>
+        <version>1.1.14</version>
+        <scope>provided</scope>
+      </dependency>
+
     </dependencies>
   </dependencyManagement>
 
@@ -238,6 +246,7 @@
 
   <modules>
     <module>core</module>
+    <module>core12</module>
     <module>examples</module>
     <module>sandbox</module>
   </modules>

Modified: myfaces/tomahawk/trunk/sandbox/core/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core/pom.xml?rev=666398&r1=666397&r2=666398&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/pom.xml (original)
+++ myfaces/tomahawk/trunk/sandbox/core/pom.xml Tue Jun 10 17:13:17 2008
@@ -132,6 +132,12 @@
             <scope>compile</scope>
         </dependency>
 
+        <dependency>
+           <groupId>com.sun.facelets</groupId>
+           <artifactId>jsf-facelets</artifactId>
+           <scope>provided</scope>
+        </dependency>
+
         <!-- test dependencies -->
 
         <dependency>
@@ -254,7 +260,25 @@
 				  <goals>
 				      <goal>make-config</goal>
 				  </goals>
-				</execution>        
+				</execution>
+				<execution>
+				  <id>makesandboxtaglib</id>
+				  <configuration>
+				      <xmlFile>META-INF/sandbox.taglib.xml</xmlFile>
+				      <xmlBaseFile>src/main/conf/META-INF/facelets-taglib-base.xml</xmlBaseFile>
+				      <templateFile>facelets-taglib.vm</templateFile>
+				      <params>
+                         <shortname>s</shortname>
+                         <uri>http://myfaces.apache.org/sandbox</uri>
+				      </params>
+				      <modelIds>
+				          <modelId>tomahawk-sandbox</modelId>
+				      </modelIds>
+				  </configuration>
+				  <goals>
+				      <goal>make-config</goal>
+				  </goals>
+				</execution>
 			  </executions>
 			</plugin>
 

Added: myfaces/tomahawk/trunk/sandbox/core/src/main/conf/META-INF/facelets-taglib-base.xml
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core/src/main/conf/META-INF/facelets-taglib-base.xml?rev=666398&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/conf/META-INF/facelets-taglib-base.xml (added)
+++ myfaces/tomahawk/trunk/sandbox/core/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/core/src/main/conf/META-INF/facelets-taglib-base.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tomahawk/trunk/sandbox/core/src/main/conf/META-INF/facelets-taglib-base.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Modified: myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/ajaxchildcombobox/AbstractAjaxChildComboBox.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/ajaxchildcombobox/AbstractAjaxChildComboBox.java?rev=666398&r1=666397&r2=666398&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/ajaxchildcombobox/AbstractAjaxChildComboBox.java (original)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/ajaxchildcombobox/AbstractAjaxChildComboBox.java Tue Jun 10 17:13:17 2008
@@ -39,6 +39,7 @@
  *   name = "s:ajaxChildComboBox"
  *   class = "org.apache.myfaces.custom.ajaxchildcombobox.AjaxChildComboBox"
  *   tagClass = "org.apache.myfaces.custom.ajaxchildcombobox.AjaxChildComboBoxTag"
+ *   tagHandler = "org.apache.myfaces.custom.ajaxchildcombobox.AjaxChildComboBoxTagHandler"
  *   
  * @author Sharath Reddy
  */

Added: myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/ajaxchildcombobox/AjaxChildComboBoxTagHandler.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/ajaxchildcombobox/AjaxChildComboBoxTagHandler.java?rev=666398&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/ajaxchildcombobox/AjaxChildComboBoxTagHandler.java (added)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/ajaxchildcombobox/AjaxChildComboBoxTagHandler.java Tue Jun 10 17:13:17 2008
@@ -0,0 +1,60 @@
+/*
+ * 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.faces.application.Application;
+import javax.faces.el.MethodBinding;
+
+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)
+            {
+                MethodBinding mb = app.createMethodBinding(
+                    _ajaxSelectItemsMethod, ajaxSelectItemsMethodParamList);
+                comp.setAjaxSelectItemsMethod(mb);
+            }
+        }        
+    }
+}

Propchange: myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/ajaxchildcombobox/AjaxChildComboBoxTagHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/ajaxchildcombobox/AjaxChildComboBoxTagHandler.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Modified: myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/suggestajax/inputsuggestajax/AbstractInputSuggestAjax.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/suggestajax/inputsuggestajax/AbstractInputSuggestAjax.java?rev=666398&r1=666397&r2=666398&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/suggestajax/inputsuggestajax/AbstractInputSuggestAjax.java (original)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/suggestajax/inputsuggestajax/AbstractInputSuggestAjax.java Tue Jun 10 17:13:17 2008
@@ -32,6 +32,7 @@
  *   name = "s:inputSuggestAjax"
  *   class = "org.apache.myfaces.custom.suggestajax.inputsuggestajax.InputSuggestAjax"
  *   tagClass = "org.apache.myfaces.custom.suggestajax.inputsuggestajax.InputSuggestAjaxTag"
+ *   tagHandler = "org.apache.myfaces.custom.suggestajax.inputsuggestajax.InputSuggestAjaxTagHandler"
  *   
  * @author Gerald Muellan (latest modification by $Author$)
  * @author Martin Marinschek

Added: myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/suggestajax/inputsuggestajax/InputSuggestAjaxTagHandler.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/suggestajax/inputsuggestajax/InputSuggestAjaxTagHandler.java?rev=666398&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/suggestajax/inputsuggestajax/InputSuggestAjaxTagHandler.java (added)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/suggestajax/inputsuggestajax/InputSuggestAjaxTagHandler.java Tue Jun 10 17:13:17 2008
@@ -0,0 +1,96 @@
+/*
+ * 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.suggestajax.inputsuggestajax;
+
+import javax.faces.application.Application;
+import javax.faces.el.ValueBinding;
+import javax.faces.webapp.UIComponentTag;
+
+import org.apache.myfaces.custom.suggestajax.AbstractSuggestAjaxTag;
+import org.apache.myfaces.custom.suggestajax.SuggestAjax;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.MetaRuleset;
+import com.sun.facelets.tag.MethodRule;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.jsf.ComponentConfig;
+import com.sun.facelets.tag.jsf.html.HtmlComponentHandler;
+
+public class InputSuggestAjaxTagHandler extends HtmlComponentHandler
+{
+    
+    private static final Class[] itemLabelMethodParamList = new Class[]{Object.class};
+    
+    private static final String ITEM_LABEL_METHOD = "itemLabelMethod";
+    private static final String SUGGESTED_ITEMS_METHOD = "suggestedItemsMethod";
+    private static final String MAX_SUGGESTED_ITEMS = "maxSuggestedItems";
+
+    private TagAttribute suggestedItemsMethodAttr;
+    private TagAttribute maxSuggestedItemsAttr;
+    
+    public InputSuggestAjaxTagHandler(ComponentConfig config)
+    {
+        super(config);
+        suggestedItemsMethodAttr = getAttribute(SUGGESTED_ITEMS_METHOD);
+        maxSuggestedItemsAttr = getAttribute(MAX_SUGGESTED_ITEMS);
+    }
+    
+    protected void setAttributes(FaceletContext ctx, Object instance)
+    {
+        super.setAttributes(ctx, instance);
+
+        Application app = ctx.getFacesContext().getApplication();
+        
+        SuggestAjax comp = (SuggestAjax) instance;
+        
+        if (maxSuggestedItemsAttr != null){
+            String maxSuggestedItems = maxSuggestedItemsAttr.getValue();
+            
+            if (maxSuggestedItems != null)
+            {
+                if (UIComponentTag.isValueReference(maxSuggestedItems))
+                {
+                    ValueBinding vb = app.createValueBinding(maxSuggestedItems);
+                    comp.setValueBinding(MAX_SUGGESTED_ITEMS, vb);
+                }
+                else
+                {
+                    comp.getAttributes().put(MAX_SUGGESTED_ITEMS, Integer.valueOf(maxSuggestedItems));
+                }
+            } 
+        }
+        
+        if (suggestedItemsMethodAttr != null){
+            String suggestedItemsMethod = suggestedItemsMethodAttr.getValue();
+            if (suggestedItemsMethod != null)
+            {
+                AbstractSuggestAjaxTag.setSuggestedItemsMethodProperty(ctx.getFacesContext(),
+                        comp,suggestedItemsMethod);
+            }
+        }
+    }
+    
+    protected MetaRuleset createMetaRuleset(Class type)
+    {
+        return super.createMetaRuleset(type).addRule(
+                new MethodRule(ITEM_LABEL_METHOD, 
+                        String.class, itemLabelMethodParamList));        
+    }
+    
+}

Propchange: myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/suggestajax/inputsuggestajax/InputSuggestAjaxTagHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/suggestajax/inputsuggestajax/InputSuggestAjaxTagHandler.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Modified: myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/suggestajax/tablesuggestajax/AbstractTableSuggestAjax.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/suggestajax/tablesuggestajax/AbstractTableSuggestAjax.java?rev=666398&r1=666397&r2=666398&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/suggestajax/tablesuggestajax/AbstractTableSuggestAjax.java (original)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/suggestajax/tablesuggestajax/AbstractTableSuggestAjax.java Tue Jun 10 17:13:17 2008
@@ -33,6 +33,7 @@
  *   name = "s:tableSuggestAjax"
  *   class = "org.apache.myfaces.custom.suggestajax.tablesuggestajax.TableSuggestAjax"
  *   tagClass = "org.apache.myfaces.custom.suggestajax.tablesuggestajax.TableSuggestAjaxTag"
+ *   tagHandler = "org.apache.myfaces.custom.suggestajax.tablesuggestajax.TableSuggestAjaxTagHandler"
  *   
  * @author Gerald Muellan
  *         Date: 25.03.2006

Added: myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/suggestajax/tablesuggestajax/TableSuggestAjaxTagHandler.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/suggestajax/tablesuggestajax/TableSuggestAjaxTagHandler.java?rev=666398&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/suggestajax/tablesuggestajax/TableSuggestAjaxTagHandler.java (added)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/suggestajax/tablesuggestajax/TableSuggestAjaxTagHandler.java Tue Jun 10 17:13:17 2008
@@ -0,0 +1,83 @@
+/*
+ * 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.suggestajax.tablesuggestajax;
+
+import javax.faces.application.Application;
+import javax.faces.el.ValueBinding;
+import javax.faces.webapp.UIComponentTag;
+
+import org.apache.myfaces.custom.suggestajax.AbstractSuggestAjaxTag;
+import org.apache.myfaces.custom.suggestajax.SuggestAjax;
+
+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 TableSuggestAjaxTagHandler extends HtmlComponentHandler
+{
+    private static final String SUGGESTED_ITEMS_METHOD = "suggestedItemsMethod";
+    private static final String MAX_SUGGESTED_ITEMS = "maxSuggestedItems";
+
+    private TagAttribute suggestedItemsMethodAttr;
+    private TagAttribute maxSuggestedItemsAttr;
+    
+    public TableSuggestAjaxTagHandler(ComponentConfig config)
+    {
+        super(config);
+        suggestedItemsMethodAttr = getAttribute(SUGGESTED_ITEMS_METHOD);
+        maxSuggestedItemsAttr = getAttribute(MAX_SUGGESTED_ITEMS);
+    }
+    
+    protected void setAttributes(FaceletContext ctx, Object instance)
+    {
+        super.setAttributes(ctx, instance);
+
+        Application app = ctx.getFacesContext().getApplication();
+        
+        SuggestAjax comp = (SuggestAjax) instance;
+        
+        if (maxSuggestedItemsAttr != null){
+            String maxSuggestedItems = maxSuggestedItemsAttr.getValue();
+            
+            if (maxSuggestedItems != null)
+            {
+                if (UIComponentTag.isValueReference(maxSuggestedItems))
+                {
+                    ValueBinding vb = app.createValueBinding(maxSuggestedItems);
+                    comp.setValueBinding(MAX_SUGGESTED_ITEMS, vb);
+                }
+                else
+                {
+                    comp.getAttributes().put(MAX_SUGGESTED_ITEMS, Integer.valueOf(maxSuggestedItems));
+                }
+            } 
+        }
+        
+        if (suggestedItemsMethodAttr != null){
+            String suggestedItemsMethod = suggestedItemsMethodAttr.getValue();
+            if (suggestedItemsMethod != null)
+            {
+                AbstractSuggestAjaxTag.setSuggestedItemsMethodProperty(ctx.getFacesContext(),
+                        comp,suggestedItemsMethod);
+            }
+        }
+    }
+    
+}

Propchange: myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/suggestajax/tablesuggestajax/TableSuggestAjaxTagHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/suggestajax/tablesuggestajax/TableSuggestAjaxTagHandler.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: myfaces/tomahawk/trunk/sandbox/core/src/main/resources/META-INF/facelets-taglib.vm
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core/src/main/resources/META-INF/facelets-taglib.vm?rev=666398&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/resources/META-INF/facelets-taglib.vm (added)
+++ myfaces/tomahawk/trunk/sandbox/core/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/core12/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core12/pom.xml?rev=666398&r1=666397&r2=666398&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core12/pom.xml (original)
+++ myfaces/tomahawk/trunk/sandbox/core12/pom.xml Tue Jun 10 17:13:17 2008
@@ -131,6 +131,12 @@
 			<version>1.0.1-SNAPSHOT</version>
 			<scope>provided</scope>
 		</dependency>
+
+    <dependency>
+      <groupId>com.sun.facelets</groupId>
+      <artifactId>jsf-facelets</artifactId>
+      <scope>provided</scope>
+    </dependency>
         
         <!-- test dependencies -->
 
@@ -340,7 +346,25 @@
 				  <goals>
 				      <goal>make-config</goal>
 				  </goals>
-				</execution>        
+				</execution>
+                <execution>
+                  <id>makesandboxtaglib</id>
+                  <configuration>
+                      <xmlFile>META-INF/sandbox.taglib.xml</xmlFile>
+                      <xmlBaseFile>src/main/conf/META-INF/facelets-taglib-base.xml</xmlBaseFile>
+                      <templateFile>facelets-taglib.vm</templateFile>
+                      <params>
+                         <shortname>s</shortname>
+                         <uri>http://myfaces.apache.org/sandbox</uri>
+                      </params>
+                      <modelIds>
+                          <modelId>tomahawk-sandbox</modelId>
+                      </modelIds>
+                  </configuration>
+                  <goals>
+                      <goal>make-config</goal>
+                  </goals>
+                </execution>
 			  </executions>
 			</plugin>