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 2009/08/02 02:02:42 UTC
svn commit: r799963 - in /myfaces/core/trunk/impl/src/main: conf/META-INF/
java/org/apache/myfaces/config/
java/org/apache/myfaces/view/facelets/tag/jsf/
java/org/apache/myfaces/view/facelets/tag/jsf/core/
java/org/apache/myfaces/view/facelets/tag/jsf/...
Author: lu4242
Date: Sun Aug 2 00:02:41 2009
New Revision: 799963
URL: http://svn.apache.org/viewvc?rev=799963&view=rev
Log:
MYFACES-2297 Add TagHandlerDelegateFactory implementation
Added:
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/BehaviorTagHandlerDelegate.java (with props)
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ComponentTagHandlerDelegate.java (with props)
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ConverterTagHandlerDelegate.java (with props)
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/TagHandlerDelegateFactoryImpl.java (with props)
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ValidatorTagHandlerDelegate.java (with props)
Modified:
myfaces/core/trunk/impl/src/main/conf/META-INF/standard-faces-config-base.xml
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ComponentHandler.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ConvertHandler.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ValidateHandler.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/ConvertDateTimeHandler.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/ConvertDelegateHandler.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/ConvertNumberHandler.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/ValidateDelegateHandler.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/VerbatimHandler.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/html/HtmlComponentHandler.java
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/ComponentRefHandler.java
myfaces/core/trunk/impl/src/main/resources/org/apache/myfaces/resource/web-facesconfig_2_0.xsd
Modified: myfaces/core/trunk/impl/src/main/conf/META-INF/standard-faces-config-base.xml
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/conf/META-INF/standard-faces-config-base.xml?rev=799963&r1=799962&r2=799963&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/conf/META-INF/standard-faces-config-base.xml (original)
+++ myfaces/core/trunk/impl/src/main/conf/META-INF/standard-faces-config-base.xml Sun Aug 2 00:02:41 2009
@@ -48,12 +48,15 @@
</application>
<factory>
<application-factory>org.apache.myfaces.application.ApplicationFactoryImpl</application-factory>
+ <exception-handler-factory>org.apache.myfaces.context.ExceptionHandlerFactoryImpl</exception-handler-factory>
+ <external-context-factory>org.apache.myfaces.context.ExternalContextFactoryImpl</external-context-factory>
<faces-context-factory>org.apache.myfaces.context.FacesContextFactoryImpl</faces-context-factory>
<partial-view-context-factory>org.apache.myfaces.context.PartialViewContextFactoryImpl</partial-view-context-factory>
<lifecycle-factory>org.apache.myfaces.lifecycle.LifecycleFactoryImpl</lifecycle-factory>
<render-kit-factory>org.apache.myfaces.renderkit.RenderKitFactoryImpl</render-kit-factory>
<visit-context-factory>org.apache.myfaces.component.visit.VisitContextFactoryImpl</visit-context-factory>
<view-declaration-language-factory>org.apache.myfaces.view.ViewDeclarationLanguageFactoryImpl</view-declaration-language-factory>
+ <tag-handler-delegate-factory>org.apache.myfaces.view.facelets.tag.jsf.TagHandlerDelegateFactoryImpl</tag-handler-delegate-factory>
<exception-handler-factory>org.apache.myfaces.context.ExceptionHandlerFactoryImpl</exception-handler-factory>
</factory>
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java?rev=799963&r1=799962&r2=799963&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java Sun Aug 2 00:02:41 2009
@@ -102,6 +102,7 @@
import org.apache.myfaces.shared_impl.util.serial.DefaultSerialFactory;
import org.apache.myfaces.shared_impl.util.serial.SerialFactory;
import org.apache.myfaces.view.ViewDeclarationLanguageFactoryImpl;
+import org.apache.myfaces.view.facelets.tag.jsf.TagHandlerDelegateFactoryImpl;
import org.apache.myfaces.view.facelets.util.Classpath;
import org.xml.sax.SAXException;
@@ -134,6 +135,7 @@
private static final String DEFAULT_VISIT_CONTEXT_FACTORY = VisitContextFactoryImpl.class.getName();
private static final String DEFAULT_VIEW_DECLARATION_LANGUAGE_FACTORY = ViewDeclarationLanguageFactoryImpl.class.getName();
private static final String DEFAULT_EXCEPTION_HANDLER_FACTORY = ExceptionHandlerFactoryImpl.class.getName();
+ private static final String DEFAULT_TAG_HANDLER_DELEGATE_FACTORY = TagHandlerDelegateFactoryImpl.class.getName();
private static final String DEFAULT_FACES_CONFIG = "/WEB-INF/faces-config.xml";
private static final Set<String> FACTORY_NAMES = new HashSet<String>();
@@ -144,6 +146,7 @@
FACTORY_NAMES.add(FactoryFinder.FACES_CONTEXT_FACTORY);
FACTORY_NAMES.add(FactoryFinder.LIFECYCLE_FACTORY);
FACTORY_NAMES.add(FactoryFinder.RENDER_KIT_FACTORY);
+ FACTORY_NAMES.add(FactoryFinder.TAG_HANDLER_DELEGATE_FACTORY);
FACTORY_NAMES.add(FactoryFinder.PARTIAL_VIEW_CONTEXT_FACTORY);
FACTORY_NAMES.add(FactoryFinder.VISIT_CONTEXT_FACTORY);
FACTORY_NAMES.add(FactoryFinder.VIEW_DECLARATION_LANGUAGE_FACTORY);
@@ -1532,6 +1535,8 @@
DEFAULT_LIFECYCLE_FACTORY);
setFactories(FactoryFinder.RENDER_KIT_FACTORY, dispenser.getRenderKitFactoryIterator(),
DEFAULT_RENDER_KIT_FACTORY);
+ setFactories(FactoryFinder.TAG_HANDLER_DELEGATE_FACTORY, dispenser.getTagHandlerDelegateFactoryIterator(),
+ DEFAULT_TAG_HANDLER_DELEGATE_FACTORY);
setFactories(FactoryFinder.PARTIAL_VIEW_CONTEXT_FACTORY, dispenser.getPartialViewContextFactoryIterator(),
DEFAULT_PARTIAL_VIEW_CONTEXT_FACTORY);
setFactories(FactoryFinder.VISIT_CONTEXT_FACTORY, dispenser.getVisitContextFactoryIterator(),
Added: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/BehaviorTagHandlerDelegate.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/BehaviorTagHandlerDelegate.java?rev=799963&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/BehaviorTagHandlerDelegate.java (added)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/BehaviorTagHandlerDelegate.java Sun Aug 2 00:02:41 2009
@@ -0,0 +1,59 @@
+/*
+ * 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.view.facelets.tag.jsf;
+
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+import javax.faces.view.facelets.BehaviorHandler;
+import javax.faces.view.facelets.FaceletContext;
+import javax.faces.view.facelets.MetaRuleset;
+import javax.faces.view.facelets.TagHandlerDelegate;
+
+/**
+ * @author Leonardo Uribe (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ *
+ * @since 2.0
+ */
+public class BehaviorTagHandlerDelegate extends TagHandlerDelegate
+{
+
+ private BehaviorHandler _delegate;
+
+ public BehaviorTagHandlerDelegate(BehaviorHandler delegate)
+ {
+ _delegate = delegate;
+ }
+
+ @Override
+ public void apply(FaceletContext ctx, UIComponent comp) throws IOException
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public MetaRuleset createMetaRuleset(Class<?> type)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
Propchange: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/BehaviorTagHandlerDelegate.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/BehaviorTagHandlerDelegate.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ComponentHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ComponentHandler.java?rev=799963&r1=799962&r2=799963&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ComponentHandler.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ComponentHandler.java Sun Aug 2 00:02:41 2009
@@ -45,9 +45,11 @@
* Implementation of the tag logic used in the JSF specification. This is your golden hammer for wiring UIComponents to
* Facelets.
*
+ * @deprecated Use javax.faces.view.facelets.ComponentHandler instead
* @author Jacob Hookom
* @version $Id: ComponentHandler.java,v 1.19 2008/07/13 19:01:47 rlubke Exp $
*/
+@Deprecated
public class ComponentHandler extends MetaTagHandler
{
Added: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ComponentTagHandlerDelegate.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ComponentTagHandlerDelegate.java?rev=799963&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ComponentTagHandlerDelegate.java (added)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ComponentTagHandlerDelegate.java Sun Aug 2 00:02:41 2009
@@ -0,0 +1,290 @@
+/*
+ * 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.view.facelets.tag.jsf;
+
+import java.io.IOException;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.el.ValueExpression;
+import javax.faces.application.Application;
+import javax.faces.component.ActionSource;
+import javax.faces.component.EditableValueHolder;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIViewRoot;
+import javax.faces.component.ValueHolder;
+import javax.faces.context.FacesContext;
+import javax.faces.view.facelets.ComponentConfig;
+import javax.faces.view.facelets.ComponentHandler;
+import javax.faces.view.facelets.FaceletContext;
+import javax.faces.view.facelets.MetaRuleset;
+import javax.faces.view.facelets.TagAttribute;
+import javax.faces.view.facelets.TagException;
+import javax.faces.view.facelets.TagHandlerDelegate;
+
+import org.apache.myfaces.view.facelets.tag.MetaRulesetImpl;
+
+/**
+ *
+ * Implementation of the tag logic used in the JSF specification.
+ *
+ * @see org.apache.myfaces.view.facelets.tag.jsf.ComponentHandler
+ * @author Leonardo Uribe (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ *
+ * @since 2.0
+ */
+public class ComponentTagHandlerDelegate extends TagHandlerDelegate
+{
+ private final static Logger log = Logger.getLogger("facelets.tag.component");
+
+ private final ComponentHandler _delegate;
+
+ private final TagAttribute _binding;
+
+ private final String _componentType;
+
+ private final TagAttribute _id;
+
+ private final String _rendererType;
+
+ public ComponentTagHandlerDelegate(ComponentHandler delegate)
+ {
+ _delegate = delegate;
+ ComponentConfig delegateComponentConfig = delegate.getComponentConfig();
+ _componentType = delegateComponentConfig.getComponentType();
+ _rendererType = delegateComponentConfig.getRendererType();
+ _id = delegate.getTagAttribute("id");
+ _binding = delegate.getTagAttribute("binding");
+ }
+
+ /**
+ * Method handles UIComponent tree creation in accordance with the JSF 1.2 spec.
+ * <ol>
+ * <li>First determines this UIComponent's id by calling {@link #getId(FaceletContext) getId(FaceletContext)}.</li>
+ * <li>Search the parent for an existing UIComponent of the id we just grabbed</li>
+ * <li>If found, {@link #markForDeletion(UIComponent) mark} its children for deletion.</li>
+ * <li>If <i>not</i> found, call {@link #createComponent(FaceletContext) createComponent}.
+ * <ol>
+ * <li>Only here do we apply {@link ObjectHandler#setAttributes(FaceletContext, Object) attributes}</li>
+ * <li>Set the UIComponent's id</li>
+ * <li>Set the RendererType of this instance</li>
+ * </ol>
+ * </li>
+ * <li>Now apply the nextHandler, passing the UIComponent we've created/found.</li>
+ * <li>Now add the UIComponent to the passed parent</li>
+ * <li>Lastly, if the UIComponent already existed (found), then {@link #finalizeForDeletion(UIComponent) finalize}
+ * for deletion.</li>
+ * </ol>
+ *
+ * @see javax.faces.view.facelets.FaceletHandler#apply(javax.faces.view.facelets.FaceletContext, javax.faces.component.UIComponent)
+ *
+ * @throws TagException
+ * if the UIComponent parent is null
+ */
+ @Override
+ public void apply(FaceletContext ctx, UIComponent parent) throws IOException
+ {
+ // make sure our parent is not null
+ if (parent == null)
+ {
+ throw new TagException(_delegate.getTag(), "Parent UIComponent was null");
+ }
+
+ // possible facet scoped
+ String facetName = this.getFacetName(ctx, parent);
+
+ // our id
+ String id = ctx.generateUniqueId(_delegate.getTagId());
+
+ // grab our component
+ UIComponent c = ComponentSupport.findChildByTagId(parent, id);
+ boolean componentFound = false;
+ if (c != null)
+ {
+ componentFound = true;
+ // mark all children for cleaning
+ if (log.isLoggable(Level.FINE))
+ {
+ log.fine(_delegate.getTag() + " Component[" + id + "] Found, marking children for cleanup");
+ }
+ ComponentSupport.markForDeletion(c);
+ }
+ else
+ {
+ c = this.createComponent(ctx);
+ if (log.isLoggable(Level.FINE))
+ {
+ log.fine(_delegate.getTag() + " Component[" + id + "] Created: " + c.getClass().getName());
+ }
+ _delegate.setAttributes(ctx, c);
+
+ // mark it owned by a facelet instance
+ c.getAttributes().put(ComponentSupport.MARK_CREATED, id);
+
+ // assign our unique id
+ if (this._id != null)
+ {
+ c.setId(this._id.getValue(ctx));
+ }
+ else
+ {
+ UIViewRoot root = ComponentSupport.getViewRoot(ctx, parent);
+ if (root != null)
+ {
+ String uid = root.createUniqueId();
+ c.setId(uid);
+ }
+ }
+
+ if (this._rendererType != null)
+ {
+ c.setRendererType(this._rendererType);
+ }
+
+ // hook method
+ _delegate.onComponentCreated(ctx, c, parent);
+ }
+
+ // first allow c to get populated
+ _delegate.applyNextHandler(ctx, c);
+
+ // finish cleaning up orphaned children
+ if (componentFound)
+ {
+ ComponentSupport.finalizeForDeletion(c);
+
+ if (facetName == null)
+ {
+ parent.getChildren().remove(c);
+ }
+ }
+
+ _delegate.onComponentPopulated(ctx, c, parent);
+
+ // add to the tree afterwards
+ // this allows children to determine if it's
+ // been part of the tree or not yet
+ if (facetName == null)
+ {
+ parent.getChildren().add(c);
+ }
+ else
+ {
+ parent.getFacets().put(facetName, c);
+ }
+ }
+
+ /**
+ * Return the Facet name we are scoped in, otherwise null
+ *
+ * @param ctx
+ * @return
+ */
+ protected final String getFacetName(FaceletContext ctx, UIComponent parent)
+ {
+ // TODO: REFACTOR - "facelets.FACET_NAME" should be a constant somewhere, used to be in FacetHandler
+ // from real Facelets
+ return (String) parent.getAttributes().get("facelets.FACET_NAME");
+ }
+
+ /**
+ * If the binding attribute was specified, use that in conjuction with our componentType String variable to call
+ * createComponent on the Application, otherwise just pass the componentType String. <p /> If the binding was used,
+ * then set the ValueExpression "binding" on the created UIComponent.
+ *
+ * @see Application#createComponent(javax.faces.el.ValueBinding, javax.faces.context.FacesContext, java.lang.String)
+ * @see Application#createComponent(java.lang.String)
+ * @param ctx
+ * FaceletContext to use in creating a component
+ * @return
+ */
+ protected UIComponent createComponent(FaceletContext ctx)
+ {
+ UIComponent c = null;
+ FacesContext faces = ctx.getFacesContext();
+ Application app = faces.getApplication();
+ if (this._binding != null)
+ {
+ ValueExpression ve = this._binding.getValueExpression(ctx, Object.class);
+
+ c = app.createComponent(ve, faces, this._componentType);
+ if (c != null)
+ {
+ c.setValueExpression("binding", ve);
+ }
+ }
+ else
+ {
+ c = app.createComponent(this._componentType);
+ }
+ return c;
+ }
+
+ /**
+ * If the id TagAttribute was specified, get it's value, otherwise generate a unique id from our tagId.
+ *
+ * @see TagAttribute#getValue(FaceletContext)
+ * @param ctx
+ * FaceletContext to use
+ * @return what should be a unique Id
+ */
+ protected String getId(FaceletContext ctx)
+ {
+ if (this._id != null)
+ {
+ return this._id.getValue(ctx);
+ }
+ return ctx.generateUniqueId(_delegate.getTagId());
+ }
+
+ @Override
+ public MetaRuleset createMetaRuleset(Class<?> type)
+ {
+ MetaRuleset m = new MetaRulesetImpl(_delegate.getTag(), type);
+ // ignore standard component attributes
+ m.ignore("binding").ignore("id");
+
+ // add auto wiring for attributes
+ m.addRule(ComponentRule.Instance);
+
+ // if it's an ActionSource
+ if (ActionSource.class.isAssignableFrom(type))
+ {
+ m.addRule(ActionSourceRule.Instance);
+ }
+
+ // if it's a ValueHolder
+ if (ValueHolder.class.isAssignableFrom(type))
+ {
+ m.addRule(ValueHolderRule.Instance);
+
+ // if it's an EditableValueHolder
+ if (EditableValueHolder.class.isAssignableFrom(type))
+ {
+ m.ignore("submittedValue");
+ m.ignore("valid");
+ m.addRule(EditableValueHolderRule.Instance);
+ }
+ }
+
+ return m;
+ }
+
+}
Propchange: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ComponentTagHandlerDelegate.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ComponentTagHandlerDelegate.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ConvertHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ConvertHandler.java?rev=799963&r1=799962&r2=799963&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ConvertHandler.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ConvertHandler.java Sun Aug 2 00:02:41 2009
@@ -43,12 +43,14 @@
* set/create Converter is the passed UIComponent's parent is null, signifying that it wasn't restored from an existing
* tree.
*
+ * @deprecated use javax.faces.view.facelets.ConverterHandler instead
* @see javax.faces.webapp.ConverterELTag
* @see javax.faces.convert.Converter
* @see javax.faces.component.ValueHolder
* @author Jacob Hookom
* @version $Id: ConvertHandler.java,v 1.4 2008/07/13 19:01:46 rlubke Exp $
*/
+@Deprecated
public class ConvertHandler extends MetaTagHandlerImpl
{
Added: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ConverterTagHandlerDelegate.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ConverterTagHandlerDelegate.java?rev=799963&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ConverterTagHandlerDelegate.java (added)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ConverterTagHandlerDelegate.java Sun Aug 2 00:02:41 2009
@@ -0,0 +1,156 @@
+/*
+ * 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.view.facelets.tag.jsf;
+
+import java.io.IOException;
+
+import javax.el.ValueExpression;
+import javax.faces.component.UIComponent;
+import javax.faces.component.ValueHolder;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.view.facelets.ConverterHandler;
+import javax.faces.view.facelets.FaceletContext;
+import javax.faces.view.facelets.MetaRuleset;
+import javax.faces.view.facelets.TagAttribute;
+import javax.faces.view.facelets.TagException;
+import javax.faces.view.facelets.TagHandlerDelegate;
+
+import org.apache.myfaces.view.facelets.tag.MetaRulesetImpl;
+import org.omg.CORBA.portable.Delegate;
+
+/**
+ * Handles setting a Converter instance on a ValueHolder. Will wire all attributes set to the Converter instance
+ * created/fetched. Uses the "binding" attribute for grabbing instances to apply attributes to. <p/> Will only
+ * set/create Converter is the passed UIComponent's parent is null, signifying that it wasn't restored from an existing
+ * tree.
+ *
+ * @author Leonardo Uribe (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ *
+ * @since 2.0
+ */
+public class ConverterTagHandlerDelegate extends TagHandlerDelegate
+{
+ private ConverterHandler _delegate;
+
+ private final TagAttribute _binding;
+
+ private String _converterId;
+
+ public ConverterTagHandlerDelegate(ConverterHandler delegate)
+ {
+ _delegate = delegate;
+
+ //TODO: Is this the way?
+ if (_delegate.getConverterId(null) != null)
+ {
+ this._binding = null;
+ this._converterId = _delegate.getConverterId(null);
+ }
+ else
+ {
+ this._binding = delegate.getTagAttribute("binding");
+ this._converterId = null;
+ }
+ }
+
+ /**
+ * Set Converter instance on parent ValueHolder if it's not being restored.
+ * <ol>
+ * <li>Cast to ValueHolder</li>
+ * <li>If "binding" attribute was specified, fetch/create and re-bind to expression.</li>
+ * <li>Otherwise, call {@link #createConverter(FaceletContext) createConverter}.</li>
+ * <li>Call {@link ObjectHandler#setAttributes(FaceletContext, Object) setAttributes} on Converter instance.</li>
+ * <li>Set the Converter on the ValueHolder</li>
+ * <li>If the ValueHolder has a localValue, convert it and set the value</li>
+ * </ol>
+ *
+ * @see ValueHolder
+ * @see Converter
+ * @see #createConverter(FaceletContext)
+ * @see javax.faces.view.facelets.FaceletHandler#apply(javax.faces.view.facelets.FaceletContext, javax.faces.component.UIComponent)
+ */
+ @Override
+ public void apply(FaceletContext ctx, UIComponent parent) throws IOException
+ {
+ if (parent == null || !(parent instanceof ValueHolder))
+ {
+ throw new TagException(_delegate.getTag(), "Parent not an instance of ValueHolder: " + parent);
+ }
+
+ // only process if it's been created
+ if (parent.getParent() == null)
+ {
+ // cast to a ValueHolder
+ ValueHolder vh = (ValueHolder) parent;
+ ValueExpression ve = null;
+ Converter c = null;
+ if (this._binding != null)
+ {
+ ve = this._binding.getValueExpression(ctx, Converter.class);
+ c = (Converter) ve.getValue(ctx);
+ }
+ if (c == null)
+ {
+ c = this.createConverter(ctx);
+ if (ve != null)
+ {
+ ve.setValue(ctx, c);
+ }
+ }
+ if (c == null)
+ {
+ throw new TagException(_delegate.getTag(), "No Converter was created");
+ }
+ _delegate.setAttributes(ctx, c);
+ vh.setConverter(c);
+ Object lv = vh.getLocalValue();
+ FacesContext faces = ctx.getFacesContext();
+ if (lv instanceof String)
+ {
+ vh.setValue(c.getAsObject(faces, parent, (String) lv));
+ }
+ }
+ }
+
+ /**
+ * Create a Converter instance
+ *
+ * @param ctx
+ * FaceletContext to use
+ * @return Converter instance, cannot be null
+ */
+ protected Converter createConverter(FaceletContext ctx)
+ {
+ if (this._converterId == null)
+ {
+ throw new TagException(
+ _delegate.getTag(),
+ "Default behavior invoked of requiring a converter-id passed in the constructor, must override ConvertHandler(ConverterConfig)");
+ }
+ return ctx.getFacesContext().getApplication().createConverter(this._converterId);
+ }
+
+ @Override
+ public MetaRuleset createMetaRuleset(Class<?> type)
+ {
+ return new MetaRulesetImpl(_delegate.getTag(), type).ignore("binding");
+ }
+}
Propchange: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ConverterTagHandlerDelegate.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ConverterTagHandlerDelegate.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/TagHandlerDelegateFactoryImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/TagHandlerDelegateFactoryImpl.java?rev=799963&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/TagHandlerDelegateFactoryImpl.java (added)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/TagHandlerDelegateFactoryImpl.java Sun Aug 2 00:02:41 2009
@@ -0,0 +1,65 @@
+/*
+ * 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.view.facelets.tag.jsf;
+
+import javax.faces.view.facelets.BehaviorHandler;
+import javax.faces.view.facelets.ComponentHandler;
+import javax.faces.view.facelets.ConverterHandler;
+import javax.faces.view.facelets.TagHandlerDelegate;
+import javax.faces.view.facelets.TagHandlerDelegateFactory;
+import javax.faces.view.facelets.ValidatorHandler;
+
+/**
+ * @author Leonardo Uribe (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ *
+ * @since 2.0
+ */
+public class TagHandlerDelegateFactoryImpl extends TagHandlerDelegateFactory
+{
+
+ @Override
+ public TagHandlerDelegate createBehaviorHandlerDelegate(
+ BehaviorHandler owner)
+ {
+ return new BehaviorTagHandlerDelegate(owner);
+ }
+
+ @Override
+ public TagHandlerDelegate createComponentHandlerDelegate(
+ ComponentHandler owner)
+ {
+ return new ComponentTagHandlerDelegate(owner);
+ }
+
+ @Override
+ public TagHandlerDelegate createConverterHandlerDelegate(
+ ConverterHandler owner)
+ {
+ return new ConverterTagHandlerDelegate(owner);
+ }
+
+ @Override
+ public TagHandlerDelegate createValidatorHandlerDelegate(
+ ValidatorHandler owner)
+ {
+ return new ValidatorTagHandlerDelegate(owner);
+ }
+
+}
Propchange: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/TagHandlerDelegateFactoryImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/TagHandlerDelegateFactoryImpl.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ValidateHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ValidateHandler.java?rev=799963&r1=799962&r2=799963&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ValidateHandler.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ValidateHandler.java Sun Aug 2 00:02:41 2009
@@ -42,9 +42,11 @@
* set/create Validator is the passed UIComponent's parent is null, signifying that it wasn't restored from an existing
* tree.
*
+ * @deprecated use javax.faces.view.facelets.ValidatorHandler instead
* @author Jacob Hookom
* @version $Id: ValidateHandler.java,v 1.4 2008/07/13 19:01:46 rlubke Exp $
*/
+@Deprecated
public class ValidateHandler extends MetaTagHandlerImpl
{
Added: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ValidatorTagHandlerDelegate.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ValidatorTagHandlerDelegate.java?rev=799963&view=auto
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ValidatorTagHandlerDelegate.java (added)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ValidatorTagHandlerDelegate.java Sun Aug 2 00:02:41 2009
@@ -0,0 +1,134 @@
+/*
+ * 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.view.facelets.tag.jsf;
+
+import java.io.IOException;
+
+import javax.el.ValueExpression;
+import javax.faces.component.EditableValueHolder;
+import javax.faces.component.UIComponent;
+import javax.faces.validator.Validator;
+import javax.faces.view.facelets.FaceletContext;
+import javax.faces.view.facelets.MetaRuleset;
+import javax.faces.view.facelets.TagAttribute;
+import javax.faces.view.facelets.TagException;
+import javax.faces.view.facelets.TagHandlerDelegate;
+import javax.faces.view.facelets.ValidatorHandler;
+
+import org.apache.myfaces.view.facelets.tag.MetaRulesetImpl;
+
+/**
+ * Handles setting a Validator instance on a EditableValueHolder. Will wire all attributes set to the Validator instance
+ * created/fetched. Uses the "binding" attribute for grabbing instances to apply attributes to. <p/> Will only
+ * set/create Validator is the passed UIComponent's parent is null, signifying that it wasn't restored from an existing
+ * tree.
+ *
+ * @author Leonardo Uribe (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ *
+ * @since 2.0
+ */
+public class ValidatorTagHandlerDelegate extends TagHandlerDelegate
+{
+ private ValidatorHandler _delegate;
+
+ private final TagAttribute _binding;
+
+ private String _validatorId;
+
+ public ValidatorTagHandlerDelegate(ValidatorHandler delegate)
+ {
+ _delegate = delegate;
+
+ //TODO: Is this the way?
+ if (_delegate.getValidatorConfig().getValidatorId() != null)
+ {
+ this._binding = null;
+ this._validatorId = _delegate.getValidatorConfig().getValidatorId();
+ }
+ else
+ {
+ this._binding = delegate.getTagAttribute("binding");
+ this._validatorId = null;
+ }
+ }
+
+ @Override
+ public void apply(FaceletContext ctx, UIComponent parent) throws IOException
+ {
+
+ if (parent == null || !(parent instanceof EditableValueHolder))
+ {
+ throw new TagException(_delegate.getTag(), "Parent not an instance of EditableValueHolder: " + parent);
+ }
+
+ // only process if it's been created
+ if (parent.getParent() == null)
+ {
+ // cast to a ValueHolder
+ EditableValueHolder evh = (EditableValueHolder) parent;
+ ValueExpression ve = null;
+ Validator v = null;
+ if (this._binding != null)
+ {
+ ve = this._binding.getValueExpression(ctx, Validator.class);
+ v = (Validator) ve.getValue(ctx);
+ }
+ if (v == null)
+ {
+ v = this.createValidator(ctx);
+ if (ve != null)
+ {
+ ve.setValue(ctx, v);
+ }
+ }
+ if (v == null)
+ {
+ throw new TagException(_delegate.getTag(), "No Validator was created");
+ }
+ _delegate.setAttributes(ctx, v);
+ evh.addValidator(v);
+ }
+ }
+
+ /**
+ * Template method for creating a Validator instance
+ *
+ * @param ctx
+ * FaceletContext to use
+ * @return a new Validator instance
+ */
+ protected Validator createValidator(FaceletContext ctx)
+ {
+ if (this._validatorId == null)
+ {
+ throw new TagException(
+ _delegate.getTag(),
+ "Default behavior invoked of requiring a validator-id passed in the constructor, must override ValidateHandler(ValidatorConfig)");
+ }
+ return ctx.getFacesContext().getApplication().createValidator(this._validatorId);
+ }
+
+ @Override
+ public MetaRuleset createMetaRuleset(Class<?> type)
+ {
+ return new MetaRulesetImpl(_delegate.getTag(), type).ignore("binding");
+ }
+
+}
Propchange: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ValidatorTagHandlerDelegate.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ValidatorTagHandlerDelegate.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/ConvertDateTimeHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/ConvertDateTimeHandler.java?rev=799963&r1=799962&r2=799963&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/ConvertDateTimeHandler.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/ConvertDateTimeHandler.java Sun Aug 2 00:02:41 2009
@@ -25,6 +25,7 @@
import javax.faces.convert.Converter;
import javax.faces.convert.DateTimeConverter;
import javax.faces.view.facelets.ConverterConfig;
+import javax.faces.view.facelets.ConverterHandler;
import javax.faces.view.facelets.FaceletContext;
import javax.faces.view.facelets.FaceletException;
import javax.faces.view.facelets.MetaRuleset;
@@ -32,17 +33,17 @@
import javax.faces.view.facelets.TagAttributeException;
import org.apache.myfaces.view.facelets.tag.jsf.ComponentSupport;
-import org.apache.myfaces.view.facelets.tag.jsf.ConvertHandler;
/**
* Register a DateTimeConverter instance on the UIComponent associated with the closest parent UIComponent custom
* action. <p/> See <a target="_new"
* href="http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/tlddocs/f/convertDateTime.html">tag documentation</a>.
*
+ * @deprecated use
* @author Jacob Hookom
* @version $Id: ConvertDateTimeHandler.java,v 1.6 2008/07/13 19:01:44 rlubke Exp $
*/
-public final class ConvertDateTimeHandler extends ConvertHandler
+public final class ConvertDateTimeHandler extends ConverterHandler
{
private final TagAttribute dateStyle;
@@ -88,7 +89,7 @@
*
* @see org.apache.myfaces.view.facelets.tag.ObjectHandler#setAttributes(javax.faces.view.facelets.FaceletContext, java.lang.Object)
*/
- protected void setAttributes(FaceletContext ctx, Object obj)
+ public void setAttributes(FaceletContext ctx, Object obj)
{
DateTimeConverter c = (DateTimeConverter) obj;
if (this.locale != null)
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/ConvertDelegateHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/ConvertDelegateHandler.java?rev=799963&r1=799962&r2=799963&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/ConvertDelegateHandler.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/ConvertDelegateHandler.java Sun Aug 2 00:02:41 2009
@@ -22,13 +22,12 @@
import javax.faces.FacesException;
import javax.faces.convert.Converter;
import javax.faces.view.facelets.ConverterConfig;
+import javax.faces.view.facelets.ConverterHandler;
import javax.faces.view.facelets.FaceletContext;
import javax.faces.view.facelets.FaceletException;
import javax.faces.view.facelets.MetaRuleset;
import javax.faces.view.facelets.TagAttribute;
-import org.apache.myfaces.view.facelets.tag.jsf.ConvertHandler;
-
/**
* Register a named Converter instance on the UIComponent associated with the closest parent UIComponent custom action.
* <p/> See <a target="_new" href="http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/tlddocs/f/converter.html">tag
@@ -37,7 +36,7 @@
* @author Jacob Hookom
* @version $Id: ConvertDelegateHandler.java,v 1.4 2008/07/13 19:01:44 rlubke Exp $
*/
-public final class ConvertDelegateHandler extends ConvertHandler
+public final class ConvertDelegateHandler extends ConverterHandler
{
private final TagAttribute converterId;
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/ConvertNumberHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/ConvertNumberHandler.java?rev=799963&r1=799962&r2=799963&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/ConvertNumberHandler.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/ConvertNumberHandler.java Sun Aug 2 00:02:41 2009
@@ -23,13 +23,13 @@
import javax.faces.convert.Converter;
import javax.faces.convert.NumberConverter;
import javax.faces.view.facelets.ConverterConfig;
+import javax.faces.view.facelets.ConverterHandler;
import javax.faces.view.facelets.FaceletContext;
import javax.faces.view.facelets.FaceletException;
import javax.faces.view.facelets.MetaRuleset;
import javax.faces.view.facelets.TagAttribute;
import org.apache.myfaces.view.facelets.tag.jsf.ComponentSupport;
-import org.apache.myfaces.view.facelets.tag.jsf.ConvertHandler;
/**
* Register a NumberConverter instance on the UIComponent associated with the closest parent UIComponent custom action.
@@ -39,7 +39,7 @@
* @author Jacob Hookom
* @version $Id: ConvertNumberHandler.java,v 1.4 2008/07/13 19:01:44 rlubke Exp $
*/
-public final class ConvertNumberHandler extends ConvertHandler
+public final class ConvertNumberHandler extends ConverterHandler
{
private final TagAttribute locale;
@@ -69,7 +69,7 @@
*
* @see org.apache.myfaces.view.facelets.tag.ObjectHandler#setAttributes(javax.faces.view.facelets.FaceletContext, java.lang.Object)
*/
- protected void setAttributes(FaceletContext ctx, Object obj)
+ public void setAttributes(FaceletContext ctx, Object obj)
{
super.setAttributes(ctx, obj);
NumberConverter c = (NumberConverter) obj;
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/ValidateDelegateHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/ValidateDelegateHandler.java?rev=799963&r1=799962&r2=799963&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/ValidateDelegateHandler.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/ValidateDelegateHandler.java Sun Aug 2 00:02:41 2009
@@ -23,8 +23,8 @@
import javax.faces.view.facelets.MetaRuleset;
import javax.faces.view.facelets.TagAttribute;
import javax.faces.view.facelets.ValidatorConfig;
+import javax.faces.view.facelets.ValidatorHandler;
-import org.apache.myfaces.view.facelets.tag.jsf.ValidateHandler;
/**
* Register a named Validator instance on the UIComponent associated with the closest parent UIComponent custom
@@ -34,7 +34,7 @@
* @author Jacob Hookom
* @version $Id: ValidateDelegateHandler.java,v 1.4 2008/07/13 19:01:44 rlubke Exp $
*/
-public final class ValidateDelegateHandler extends ValidateHandler
+public final class ValidateDelegateHandler extends ValidatorHandler
{
private final TagAttribute validatorId;
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/VerbatimHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/VerbatimHandler.java?rev=799963&r1=799962&r2=799963&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/VerbatimHandler.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/core/VerbatimHandler.java Sun Aug 2 00:02:41 2009
@@ -20,11 +20,11 @@
import javax.faces.component.UIComponent;
import javax.faces.view.facelets.ComponentConfig;
+import javax.faces.view.facelets.ComponentHandler;
import javax.faces.view.facelets.FaceletContext;
import javax.faces.view.facelets.TextHandler;
import org.apache.myfaces.view.facelets.tag.TagHandlerUtils;
-import org.apache.myfaces.view.facelets.tag.jsf.ComponentHandler;
/**
* Handler for f:verbatim
@@ -39,7 +39,7 @@
super(config);
}
- protected void onComponentCreated(FaceletContext ctx, UIComponent c, UIComponent parent)
+ public void onComponentCreated(FaceletContext ctx, UIComponent c, UIComponent parent)
{
StringBuffer content = new StringBuffer();
for (TextHandler handler : TagHandlerUtils.findNextByType(nextHandler, TextHandler.class))
@@ -52,7 +52,7 @@
c.setTransient(true);
}
- protected void applyNextHandler(FaceletContext ctx, UIComponent c)
+ public void applyNextHandler(FaceletContext ctx, UIComponent c)
{
}
}
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/html/HtmlComponentHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/html/HtmlComponentHandler.java?rev=799963&r1=799962&r2=799963&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/html/HtmlComponentHandler.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/html/HtmlComponentHandler.java Sun Aug 2 00:02:41 2009
@@ -19,10 +19,9 @@
package org.apache.myfaces.view.facelets.tag.jsf.html;
import javax.faces.view.facelets.ComponentConfig;
+import javax.faces.view.facelets.ComponentHandler;
import javax.faces.view.facelets.MetaRuleset;
-import org.apache.myfaces.view.facelets.tag.jsf.ComponentHandler;
-
/**
* @author Jacob Hookom
* @version $Id: HtmlComponentHandler.java,v 1.3 2008/07/13 19:01:50 rlubke Exp $
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/ComponentRefHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/ComponentRefHandler.java?rev=799963&r1=799962&r2=799963&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/ComponentRefHandler.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/ComponentRefHandler.java Sun Aug 2 00:02:41 2009
@@ -19,8 +19,8 @@
package org.apache.myfaces.view.facelets.tag.ui;
import javax.faces.view.facelets.ComponentConfig;
+import javax.faces.view.facelets.ComponentHandler;
-import org.apache.myfaces.view.facelets.tag.jsf.ComponentHandler;
public final class ComponentRefHandler extends ComponentHandler
{
Modified: myfaces/core/trunk/impl/src/main/resources/org/apache/myfaces/resource/web-facesconfig_2_0.xsd
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/resources/org/apache/myfaces/resource/web-facesconfig_2_0.xsd?rev=799963&r1=799962&r2=799963&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/resources/org/apache/myfaces/resource/web-facesconfig_2_0.xsd (original)
+++ myfaces/core/trunk/impl/src/main/resources/org/apache/myfaces/resource/web-facesconfig_2_0.xsd Sun Aug 2 00:02:41 2009
@@ -149,11 +149,15 @@
<xsd:complexType name="faces-config-factoryType">
<xsd:choice maxOccurs="unbounded" minOccurs="0">
<xsd:element name="application-factory" type="javaee:fully-qualified-classType"/>
+ <xsd:element name="exception-handler-factory" type="javaee:fully-qualified-classType"/>
+ <xsd:element name="external-context-factory" type="javaee:fully-qualified-classType"/>
<xsd:element name="faces-context-factory" type="javaee:fully-qualified-classType"/>
<xsd:element name="partial-view-context-factory" type="javaee:fully-qualified-classType"/>
<xsd:element name="lifecycle-factory" type="javaee:fully-qualified-classType"/>
- <xsd:element name="render-kit-factory" type="javaee:fully-qualified-classType"/>
<xsd:element name="view-declaration-language-factory" type="javaee:fully-qualified-classType"/>
+ <xsd:element name="tag-handler-delegate-factory" type="javaee:fully-qualified-classType"/>
+ <xsd:element name="render-kit-factory" type="javaee:fully-qualified-classType"/>
+ <xsd:element name="visit-context-factory" type="javaee:fully-qualified-classType"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="factory-extension"
type="javaee:faces-config-factory-extensionType"/>
</xsd:choice>