I'm working on it. This is the last thing needed to get the new branch up and running. If you want to take this over, please communicate with me so that we don't step on each other's toes. When I start, I'll create a JIRA ticket.
Dennis Byrne >-----Original Message----- >From: Matthias Wessendorf [mailto:[EMAIL PROTECTED] >Sent: Sunday, June 4, 2006 10:44 AM >To: 'MyFaces Development', [EMAIL PROTECTED], 'Stan Silvert' >Subject: Re: svn commit: r411228 - >/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java > >Hi, > >is there a reason for the following dependency in clazzes like >UICommand or UIComponentBase ? > >org.apache.myfaces.el.convert.*** > >-1 on myfaces dependencie's to the API (like in JSF 1.1.x world) > >-Matthias > >On 6/4/06, Matthias Wessendorf <[EMAIL PROTECTED]> wrote: >> invokeOnComponent on UIcomponent and encodeAll() >> I did. UIData not yet ... >> >> >> >> On 6/4/06, Martin Marinschek <[EMAIL PROTECTED]> wrote: >> > Those two are invokeOnComponent? That would be Matthias, then. >> > >> > regards, >> > >> > Martin >> > >> > On 6/4/06, Dennis Byrne <[EMAIL PROTECTED]> wrote: >> > > Stan already got two of those. >> > > >> > > Dennis Byrne >> > > >> > > >-----Original Message----- >> > > >From: Martin Marinschek [mailto:[EMAIL PROTECTED] >> > > >Sent: Saturday, June 3, 2006 10:37 PM >> > > >To: 'MyFaces Development' >> > > >Subject: Re: svn commit: r411228 - >> > > >/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java >> > > > >> > > >Three changes are necessary: >> > > > >> > > >-invokeOnComponent, two times, as it needs to be implemented on >> > > >UIComponent and UIData >> > > >-encodeAll on UIComponent >> > > > >> > > >regards, >> > > > >> > > >Martin >> > > > >> > > >On 6/4/06, Dennis Byrne <[EMAIL PROTECTED]> wrote: >> > > >> >Basically, those are invokeOnComponent, and the contentInterweaving >> > > >> >/tree built first approach. The only 1.2 thing I need for that is >> > > >> >three new methods in the API. Functionalitywise, we'll be as good as >> > > >> >1.2 with this. >> > > >> >> > > >> On the subject of duplication of effort, is >> > > >> UIComponent.invokeOnComponent one of these methods ? What are the >> > > >> other two? >> > > >> >> > > >> Dennis Byrne >> > > >> >> > > >> >Stan's work has mostly been done on the unified EL, and the new API >> > > >> >coming along with that. I won't touch this at all. So I wouldn't >> > > >> >reimplement what he has been doing. >> > > >> > >> > > >> >regards, >> > > >> > >> > > >> >Martin >> > > >> > >> > > >> > >> > > >> > >> > > >> > >> > > >> > >> > > >> >On 6/3/06, Sean Schofield <[EMAIL PROTECTED]> wrote: >> > > >> >> Still -1 for me. I agree with Dennis. This will negatively impact >> > > >> >> our progress towards 1.2. Even if those of us opposed are not >> > > >> >> involved in doing the work, its still work that could be done on >> > > >> >> the >> > > >> >> full JSF 1.2 version (or something else.) >> > > >> >> >> > > >> >> Keep in mind that we are *still* trying to get a tomahawk release >> > > >> >> out >> > > >> >> the door. So far only Matthias and one non-committer have >> > > >> >> volunteered >> > > >> >> to help. >> > > >> >> >> > > >> >> Its hard to see how the 1.2 lite version will not involve >> > > >> >> duplication >> > > >> >> of work. We've already established that Stan's work can't be >> > > >> >> easily >> > > >> >> separated out into TC 5.5 and TC 6 so basically Martin and others >> > > >> >> will >> > > >> >> end up duplicating much of what he has already done just to make >> > > >> >> things work on TC 5.5. >> > > >> >> >> > > >> >> Its hard to imagine how this duplication of work is a good thing. >> > > >> >> Either Stan's work will go ignored or Martin will be duplicating >> > > >> >> what >> > > >> >> Stan did (at least partially.) Given the availabilty of our >> > > >> >> committers it sometimes takes a few weeks to get a minor release >> > > >> >> out >> > > >> >> the door so I worry that we can't afford to divide our efforts >> > > >> >> here. >> > > >> >> Three core branches, plus tobago, tomahawk, adf and now the IBM >> > > >> >> thing. >> > > >> >> We're stretching ourselves way too thin here. >> > > >> >> >> > > >> >> Sean >> > > >> >> >> > > >> >> On 6/2/06, Grant Smith <[EMAIL PROTECTED]> wrote: >> > > >> >> > +1 on Martin's plans. It's a good start to eventually having a >> > > >> >> > pure 1.2 >> > > >> >> > implementation. Let's hit it. >> > > >> >> > >> > > >> >> > >> > > >> >> > On 6/2/06, Martin Marinschek < [EMAIL PROTECTED]> wrote: >> > > >> >> > > Hi Dennis, >> > > >> >> > > >> > > >> >> > > I said I'll do the merge - and I'll do it! >> > > >> >> > > >> > > >> >> > > It will not be 1.1 compliant in a sense of passing the TCK - >> > > >> >> > > that's >> > > >> >> > > not possible, the API will change. >> > > >> >> > > >> > > >> >> > > I know that a fully certified JSF1.2 implementation is our >> > > >> >> > > ultimate, >> > > >> >> > > and most valuable goal. We'll get there, and I believe faster >> > > >> >> > > on this >> > > >> >> > > path, than on the other. More people can work along with us... >> > > >> >> > > >> > > >> >> > > But: I also believe that a 1.1.5 implementation _is_ valuable. >> > > >> >> > > There >> > > >> >> > > are quite a few people who are working on JSF right now. They >> > > >> >> > > might >> > > >> >> > > not want to switch their environment right now. They want the >> > > >> >> > > full >> > > >> >> > > functionality of 1.2 on their environment. They'll get it >> > > >> >> > > _only_ with >> > > >> >> > > MyFaces. >> > > >> >> > > >> > > >> >> > > regards, >> > > >> >> > > >> > > >> >> > > Martin >> > > >> >> > > >> > > >> >> > > On 6/2/06, Dennis Byrne <[EMAIL PROTECTED]> wrote: >> > > >> >> > > > >1.4 and 5.5 compatible way, and then in a month do the >> > > >> >> > > > >final step on >> > > >> >> > > > >1.2 pure. >> > > >> >> > > > >> > > >> >> > > > So, 30 days from today? We need JIRA taska and volunteers >> > > >> >> > > > from the JSF >> > > >> >> > 1.15 group: >> > > >> >> > > > >> > > >> >> > > > Who will do the merge? >> > > >> >> > > > Who will test it for 1.1 compliance? >> > > >> >> > > > Who will bring it back in to compliance? >> > > >> >> > > > >> > > >> >> > > > Perhaps you guys can help me figure out if we have >> > > >> >> > > > difference in values, >> > > >> >> > or difference in cost estimates. We are all in agreement that >> > > >> >> > supporting >> > > >> >> > our own MyFaces 1.15 implementation will delay a actual real >> > > >> >> > certified JSF >> > > >> >> > 1.2 release ? right? Do you just think the delay is trivial, or >> > > >> >> > do you >> > > >> >> > think your 1.15 implementation is more valuable, or do you not >> > > >> >> > value a 1.2 >> > > >> >> > implementation as much as I do? >> > > >> >> > > > >> > > >> >> > > > Dennis Byrne >> > > >> >> > > > >> > > >> >> > > > >regards, >> > > >> >> > > > > >> > > >> >> > > > >Martin >> > > >> >> > > > > >> > > >> >> > > > >On 6/2/06, Dennis Byrne <[EMAIL PROTECTED]> wrote: >> > > >> >> > > > >> @team - what is the game plan for making sure >> > > >> >> > > > >> improvements like this >> > > >> >> > are getting into the 1.2 branch? When will 1.2 be trunk ? >> > > >> >> > > > >> >> > > >> >> > > > >> @Grant - not an attack on you >> > > >> >> > > > >> >> > > >> >> > > > >> Dennis Byrne >> > > >> >> > > > >> >> > > >> >> > > > >> >-----Original Message----- >> > > >> >> > > > >> >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] >> > > >> >> > > > >> >Sent: Friday, June 2, 2006 02:35 PM >> > > >> >> > > > >> >To: [email protected] >> > > >> >> > > > >> >Subject: svn commit: r411228 - >> > > >> >> > /myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java >> > > >> >> > > > >> > >> > > >> >> > > > >> >Author: grantsmith >> > > >> >> > > > >> >Date: Fri Jun 2 11:35:51 2006 >> > > >> >> > > > >> >New Revision: 411228 >> > > >> >> > > > >> > >> > > >> >> > > > >> >URL: >> > > >> >> > http://svn.apache.org/viewvc?rev=411228&view=rev >> > > >> >> > > > >> >Log: >> > > >> >> > > > >> >MYFACES-1301: fixes check for stale components >> > > >> >> > > > >> > >> > > >> >> > > > >> > >> > > >> >> > > > >> >Modified: >> > > >> >> > > > >> > >> > > >> >> > myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java >> > > >> >> > > > >> > >> > > >> >> > > > >> >Modified: >> > > >> >> > myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java >> > > >> >> > > > >> >URL: >> > > >> >> > http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java?rev=411228&r1=411227&r2=411228&view=diff >> > > >> >> > > > >> >> > > >> >> > >============================================================================== >> > > >> >> > > > >> >--- >> > > >> >> > myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java >> > > >> >> > (original) >> > > >> >> > > > >> >+++ >> > > >> >> > myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java >> > > >> >> > Fri Jun 2 11:35:51 2006 >> > > >> >> > > > >> >@@ -52,20 +52,18 @@ >> > > >> >> > > > >> > * @version $Revision$ $Date$ >> > > >> >> > > > >> > */ >> > > >> >> > > > >> > public class ApplicationImpl >> > > >> >> > > > >> >- extends Application >> > > >> >> > > > >> >+ extends Application >> > > >> >> > > > >> > { >> > > >> >> > > > >> > private static final Log log = >> > > >> >> > LogFactory.getLog(ApplicationImpl.class); >> > > >> >> > > > >> > >> > > >> >> > > > >> > //~ Instance fields >> > > >> >> > ---------------------------------------------------------------------------- >> > > >> >> > > > >> > >> > > >> >> > > > >> > private final Map >> > > >> >> > _valueBindingCache = >> > > >> >> > > > >> >- new BiLevelCacheMap(90) >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >- protected Object newInstance(Object key) >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >- return new ValueBindingImpl( >> > > >> >> > > > >> >ApplicationImpl.this, >> > > >> >> > (String) key); >> > > >> >> > > > >> >- } >> > > >> >> > > > >> >- }; >> > > >> >> > > > >> >+ new BiLevelCacheMap(90) { >> > > >> >> > > > >> >+ protected Object newInstance(Object >> > > >> >> > > > >> >key) { >> > > >> >> > > > >> >+ return new >> > > >> >> > ValueBindingImpl(ApplicationImpl.this, (String) key); >> > > >> >> > > > >> >+ } >> > > >> >> > > > >> >+ }; >> > > >> >> > > > >> > >> > > >> >> > > > >> > private Collection _supportedLocales = >> > > >> >> > Collections.EMPTY_SET; >> > > >> >> > > > >> > private Locale _defaultLocale; >> > > >> >> > > > >> >@@ -193,7 +191,7 @@ >> > > >> >> > > > >> > } >> > > >> >> > > > >> > _propertyResolver = propertyResolver; >> > > >> >> > > > >> > if (log.isTraceEnabled()) log.trace("set >> > > >> >> > > > >> > PropertyResolver = >> > > >> >> > " + propertyResolver.getClass().getName()); >> > > >> >> > > > >> >- } >> > > >> >> > > > >> >+ } >> > > >> >> > > > >> > >> > > >> >> > > > >> > public PropertyResolver getPropertyResolver() >> > > >> >> > > > >> > { >> > > >> >> > > > >> >@@ -270,7 +268,7 @@ >> > > >> >> > > > >> > { >> > > >> >> > > > >> > _componentClassMap.put(componentType, >> > > >> >> > ClassUtils.simpleClassForName(componentClassName)); >> > > >> >> > > > >> > if (log.isTraceEnabled()) log.trace("add >> > > >> >> > > > >> > Component >> > > >> >> > class = " + componentClassName + >> > > >> >> > > > >> >- " >> > > >> >> > for type = " + componentType); >> > > >> >> > > > >> >+ " for type = " + componentType); >> > > >> >> > > > >> > } >> > > >> >> > > > >> > catch (Exception e) >> > > >> >> > > > >> > { >> > > >> >> > > > >> >@@ -297,7 +295,7 @@ >> > > >> >> > > > >> > >> > > >> >> > _converterIdToClassMap.put(converterId, >> > > >> >> > ClassUtils.simpleClassForName(converterClass)); >> > > >> >> > > > >> > if (log.isTraceEnabled()) log.trace("add >> > > >> >> > > > >> > Converter id = >> > > >> >> > " + converterId + >> > > >> >> > > > >> > " converterClass = " + >> > > >> >> > > > >> > converterClass); >> > > >> >> > > > >> >- } >> > > >> >> > > > >> >+ } >> > > >> >> > > > >> > catch (Exception e) >> > > >> >> > > > >> > { >> > > >> >> > > > >> > log.error("Converter class " + >> > > >> >> > > > >> > converterClass + " not >> > > >> >> > found", e); >> > > >> >> > > > >> >@@ -363,7 +361,7 @@ >> > > >> >> > > > >> > { >> > > >> >> > > > >> > _validatorClassMap.put(validatorId, >> > > >> >> > ClassUtils.simpleClassForName(validatorClass)); >> > > >> >> > > > >> > if (log.isTraceEnabled()) log.trace("add >> > > >> >> > > > >> > Validator id = >> > > >> >> > " + validatorId + >> > > >> >> > > > >> >- " >> > > >> >> > class = " + validatorClass); >> > > >> >> > > > >> >+ " class = " + validatorClass); >> > > >> >> > > > >> > } >> > > >> >> > > > >> > catch (Exception e) >> > > >> >> > > > >> > { >> > > >> >> > > > >> >@@ -372,7 +370,7 @@ >> > > >> >> > > > >> > } >> > > >> >> > > > >> > >> > > >> >> > > > >> > public UIComponent createComponent(String >> > > >> >> > > > >> > componentType) >> > > >> >> > > > >> >- throws FacesException >> > > >> >> > > > >> >+ throws FacesException >> > > >> >> > > > >> > { >> > > >> >> > > > >> > if ((componentType == null) || >> > > >> >> > > > >> > (componentType.length() == >> > > >> >> > 0)) >> > > >> >> > > > >> > { >> > > >> >> > > > >> >@@ -405,8 +403,8 @@ >> > > >> >> > > > >> > public UIComponent createComponent(ValueBinding >> > > >> >> > > > >> > valueBinding, >> > > >> >> > > > >> > >> > > >> >> > FacesContext facesContext, >> > > >> >> > > > >> > String >> > > >> >> > componentType) >> > > >> >> > > > >> >- throws FacesException >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >+ throws FacesException >> > > >> >> > > > >> >+ { >> > > >> >> > > > >> > if ((valueBinding == null)) >> > > >> >> > > > >> > { >> > > >> >> > > > >> > log.error("createComponent: valueBinding = >> > > >> >> > > > >> > null is not >> > > >> >> > allowed"); >> > > >> >> > > > >> >@@ -427,65 +425,55 @@ >> > > >> >> > > > >> > >> > > >> >> > > > >> > if (obj instanceof UIComponent) >> > > >> >> > > > >> > { >> > > >> >> > > > >> >- // check for stale component >> > > >> >> > > > >> >- UIComponent parent = (UIComponent) obj; >> > > >> >> > > > >> >- while (parent.getParent() != null) { >> > > >> >> > > > >> >- parent = parent.getParent(); >> > > >> >> > > > >> >- } >> > > >> >> > > > >> >- if (!(parent instanceof UIViewRoot) || >> > > >> >> > > > >> >parent == >> > > >> >> > facesContext.getViewRoot()) { >> > > >> >> > > > >> >- return (UIComponent) obj; >> > > >> >> > > > >> >- } >> > > >> >> > > > >> >- else { >> > > >> >> > > > >> >- log.debug("Stale component found >> > > >> >> > > > >> >while >> > > >> >> > creating component of type [" + componentType + "]" >> > > >> >> > > > >> >- + " for binding [" + >> > > >> >> > valueBinding.getExpressionString() + "]"); >> > > >> >> > > > >> >- } >> > > >> >> > > > >> >+ // check for stale component >> > > >> >> > > > >> >+ UIComponent parent = (UIComponent) obj; >> > > >> >> > > > >> >+ while (parent.getParent() != null) { >> > > >> >> > > > >> >+ parent = parent.getParent(); >> > > >> >> > > > >> >+ } >> > > >> >> > > > >> >+ if (!(parent instanceof UIViewRoot) || >> > > >> >> > > > >> >parent == >> > > >> >> > facesContext.getViewRoot()) { >> > > >> >> > > > >> >+ return (UIComponent) obj; >> > > >> >> > > > >> >+ } else { >> > > >> >> > > > >> >+ log.debug("Stale component found while >> > > >> >> > > > >> >creating >> > > >> >> > component of type [" + componentType + "]" >> > > >> >> > > > >> >+ + " for binding [" + >> > > >> >> > valueBinding.getExpressionString() + "]"); >> > > >> >> > > > >> >+ } >> > > >> >> > > > >> > >> > > >> >> > > > >> >- return (UIComponent) obj; >> > > >> >> > > > >> > } >> > > >> >> > > > >> >- else >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >- try { >> > > >> >> > > > >> >+ try { >> > > >> >> > > > >> > UIComponent component = >> > > >> >> > > > >> > createComponent(componentType); >> > > >> >> > > > >> > valueBinding.setValue(facesContext, >> > > >> >> > > > >> > component); >> > > >> >> > > > >> > return component; >> > > >> >> > > > >> >- } catch(FacesException ex) { >> > > >> >> > > > >> >- log.error("Exception while creating >> > > >> >> > > > >> >component of >> > > >> >> > type [" + componentType + "]" >> > > >> >> > > > >> >- + " for binding [" + >> > > >> >> > valueBinding.getExpressionString() + "]"); >> > > >> >> > > > >> >- throw ex; >> > > >> >> > > > >> >- } >> > > >> >> > > > >> >+ } catch(FacesException ex) { >> > > >> >> > > > >> >+ log.error("Exception while creating >> > > >> >> > > > >> >component of type >> > > >> >> > [" + componentType + "]" >> > > >> >> > > > >> >+ + " for binding [" + >> > > >> >> > valueBinding.getExpressionString () + "]"); >> > > >> >> > > > >> >+ throw ex; >> > > >> >> > > > >> >+ >> > > >> >> > > > >> > } >> > > >> >> > > > >> > } >> > > >> >> > > > >> > >> > > >> >> > > > >> >- public Converter createConverter(String converterId) >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >- if ((converterId == null) || >> > > >> >> > > > >> >(converterId.length() == 0)) >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >+ public Converter createConverter(String >> > > >> >> > > > >> >converterId) { >> > > >> >> > > > >> >+ if ((converterId == null) || >> > > >> >> > > > >> >(converterId.length() == 0)) { >> > > >> >> > > > >> > log.error("createConverter: converterId = >> > > >> >> > > > >> > null is not >> > > >> >> > allowed"); >> > > >> >> > > > >> > throw new >> > > >> >> > NullPointerException("createConverter: converterId = null >> > > >> >> > is not allowed"); >> > > >> >> > > > >> > } >> > > >> >> > > > >> > >> > > >> >> > > > >> > Class converterClass = (Class) >> > > >> >> > _converterIdToClassMap.get(converterId); >> > > >> >> > > > >> > >> > > >> >> > > > >> >- try >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >+ try { >> > > >> >> > > > >> > Converter converter= (Converter) >> > > >> >> > converterClass.newInstance(); >> > > >> >> > > > >> > >> > > >> >> > > > >> > setConverterProperties(converterClass, >> > > >> >> > converter); >> > > >> >> > > > >> > >> > > >> >> > > > >> > return converter; >> > > >> >> > > > >> > } >> > > >> >> > > > >> >- catch (Exception e) >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >+ catch (Exception e) { >> > > >> >> > > > >> > log.error("Could not instantiate converter >> > > >> >> > > > >> > " + >> > > >> >> > converterClass, e); >> > > >> >> > > > >> > throw new FacesException("Could not >> > > >> >> > > > >> > instantiate >> > > >> >> > converter: " + converterClass, e); >> > > >> >> > > > >> > } >> > > >> >> > > > >> > } >> > > >> >> > > > >> > >> > > >> >> > > > >> > >> > > >> >> > > > >> >- public Converter createConverter(Class targetClass) >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >- if (targetClass == null) >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >+ public Converter createConverter(Class targetClass) >> > > >> >> > > > >> >{ >> > > >> >> > > > >> >+ if (targetClass == null) { >> > > >> >> > > > >> > log.error("createConverter: targetClass = >> > > >> >> > > > >> > null is not >> > > >> >> > allowed"); >> > > >> >> > > > >> > throw new >> > > >> >> > NullPointerException("createConverter: targetClass = null >> > > >> >> > is not allowed"); >> > > >> >> > > > >> > } >> > > >> >> > > > >> >@@ -496,112 +484,87 @@ >> > > >> >> > > > >> > } >> > > >> >> > > > >> > >> > > >> >> > > > >> > >> > > >> >> > > > >> >- private Converter internalCreateConverter(Class >> > > >> >> > > > >> >targetClass) >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >+ private Converter internalCreateConverter(Class >> > > >> >> > > > >> >targetClass) { >> > > >> >> > > > >> > // Locate a Converter registered for the target >> > > >> >> > > > >> > class >> > > >> >> > itself. >> > > >> >> > > > >> > String converterClassName = >> > > >> >> > (String)_converterClassNameToClassMap.get(targetClass); >> > > >> >> > > > >> > >> > > >> >> > > > >> > //Locate a Converter registered for interfaces >> > > >> >> > > > >> > that are >> > > >> >> > > > >> > // implemented by the target class (directly or >> > > >> >> > indirectly). >> > > >> >> > > > >> >- if (converterClassName == null) >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >+ if (converterClassName == null) { >> > > >> >> > > > >> > Class interfaces[] = >> > > >> >> > > > >> > targetClass.getInterfaces(); >> > > >> >> > > > >> >- if (interfaces != null) >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >- for (int i = 0, len = >> > > >> >> > > > >> >interfaces.length; i < len; >> > > >> >> > i++) >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >- // search all superinterfaces for >> > > >> >> > > > >> >a matching >> > > >> >> > converter, create it >> > > >> >> > > > >> >+ if (interfaces != null) { >> > > >> >> > > > >> >+ for (int i = 0, len = >> > > >> >> > > > >> >interfaces.length; i < len; >> > > >> >> > i++) { >> > > >> >> > > > >> >+ // search all superinterfaces for a >> > > >> >> > > > >> >matching >> > > >> >> > converter, create it >> > > >> >> > > > >> > Converter converter = >> > > >> >> > internalCreateConverter(interfaces[i]); >> > > >> >> > > > >> >- if (converter != null) >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >+ if (converter != null) { >> > > >> >> > > > >> > return converter; >> > > >> >> > > > >> > } >> > > >> >> > > > >> > } >> > > >> >> > > > >> > } >> > > >> >> > > > >> > } >> > > >> >> > > > >> > >> > > >> >> > > > >> >- if (converterClassName != null) >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >- try >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >+ if (converterClassName != null) { >> > > >> >> > > > >> >+ try { >> > > >> >> > > > >> > Class converterClass = >> > > >> >> > ClassUtils.simpleClassForName(converterClassName); >> > > >> >> > > > >> >- >> > > >> >> > > > >> >+ >> > > >> >> > > > >> > Converter converter = (Converter) >> > > >> >> > converterClass.newInstance(); >> > > >> >> > > > >> > >> > > >> >> > > > >> > >> > > >> >> > setConverterProperties(converterClass, converter); >> > > >> >> > > > >> > >> > > >> >> > > > >> > return converter; >> > > >> >> > > > >> > } >> > > >> >> > > > >> >- catch (Exception e) >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >+ catch (Exception e) { >> > > >> >> > > > >> > log.error ("Could not instantiate >> > > >> >> > > > >> > converter " + >> > > >> >> > converterClassName, e); >> > > >> >> > > > >> > throw new FacesException("Could not >> > > >> >> > > > >> > instantiate >> > > >> >> > converter: " + converterClassName, e); >> > > >> >> > > > >> > } >> > > >> >> > > > >> > } >> > > >> >> > > > >> > >> > > >> >> > > > >> > // locate converter for primitive types >> > > >> >> > > > >> >- if (targetClass == Long.TYPE) >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >+ if (targetClass == Long.TYPE) { >> > > >> >> > > > >> > return internalCreateConverter(Long.class); >> > > >> >> > > > >> >- } else if (targetClass == Boolean.TYPE) >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >+ } else if (targetClass == Boolean.TYPE) { >> > > >> >> > > > >> > return >> > > >> >> > > > >> > internalCreateConverter(Boolean.class); >> > > >> >> > > > >> >- } else if (targetClass == Double.TYPE ) >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >+ } else if (targetClass == Double.TYPE) { >> > > >> >> > > > >> > return >> > > >> >> > > > >> > internalCreateConverter(Double.class); >> > > >> >> > > > >> >- } else if (targetClass == Byte.TYPE) >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >+ } else if (targetClass == Byte.TYPE) { >> > > >> >> > > > >> > return internalCreateConverter(Byte.class); >> > > >> >> > > > >> >- } else if (targetClass == Short.TYPE) >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >+ } else if (targetClass == Short.TYPE) { >> > > >> >> > > > >> > return internalCreateConverter(Short.class); >> > > >> >> > > > >> >- } else if (targetClass == Integer.TYPE) >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >+ } else if (targetClass == Integer.TYPE) { >> > > >> >> > > > >> > return >> > > >> >> > > > >> > internalCreateConverter(Integer.class); >> > > >> >> > > > >> >- } else if (targetClass == Float.TYPE) >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >+ } else if (targetClass == Float.TYPE) { >> > > >> >> > > > >> > return internalCreateConverter(Float.class); >> > > >> >> > > > >> >- } else if (targetClass == Character.TYPE) >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >+ } else if (targetClass == Character.TYPE) { >> > > >> >> > > > >> > return >> > > >> >> > > > >> > internalCreateConverter(Character.class); >> > > >> >> > > > >> > } >> > > >> >> > > > >> > >> > > >> >> > > > >> >- >> > > >> >> > > > >> > //Locate a Converter registered for the >> > > >> >> > > > >> > superclass (if any) >> > > >> >> > of the target class, >> > > >> >> > > > >> > // recursively working up the inheritance >> > > >> >> > > > >> > hierarchy. >> > > >> >> > > > >> > Class superClazz = targetClass.getSuperclass(); >> > > >> >> > > > >> >- if (superClazz != null) >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >+ if (superClazz != null) { >> > > >> >> > > > >> > return >> > > >> >> > internalCreateConverter(superClazz); >> > > >> >> > > > >> >- } >> > > >> >> > > > >> >- else >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >+ } else { >> > > >> >> > > > >> > return null; >> > > >> >> > > > >> > } >> > > >> >> > > > >> > >> > > >> >> > > > >> > } >> > > >> >> > > > >> > >> > > >> >> > > > >> >- private void setConverterProperties(Class >> > > >> >> > > > >> >converterClass, >> > > >> >> > Converter converter) >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >+ private void setConverterProperties(Class >> > > >> >> > > > >> >converterClass, >> > > >> >> > Converter converter) { >> > > >> >> > > > >> > >> > > >> >> > org.apache.myfaces.config.impl.digester.elements.Converter >> > > >> >> > converterConfig = >> > > >> >> > > > >> > ( >> > > >> >> > org.apache.myfaces.config.impl.digester.elements.Converter) >> > > >> >> > > > >> >- >> > > >> >> > _converterClassNameToConfigurationMap.get(converterClass.getName()); >> > > >> >> > > > >> >+ >> > > >> >> > _converterClassNameToConfigurationMap.get( >> > > >> >> > converterClass.getName()); >> > > >> >> > > > >> > >> > > >> >> > > > >> >- if(converterConfig != null) >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >+ if(converterConfig != null) { >> > > >> >> > > > >> > >> > > >> >> > > > >> > Iterator it = >> > > >> >> > > > >> > converterConfig.getProperties(); >> > > >> >> > > > >> > >> > > >> >> > > > >> >- while (it.hasNext()) >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >+ while ( it.hasNext()) { >> > > >> >> > > > >> > Property property = (Property) >> > > >> >> > > > >> > it.next(); >> > > >> >> > > > >> > >> > > >> >> > > > >> >- try >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >+ try { >> > > >> >> > > > >> > >> > > >> >> > BeanUtils.setProperty(converter,property.getPropertyName(),property.getDefaultValue()); >> > > >> >> > > > >> > } >> > > >> >> > > > >> >- catch(Throwable th) >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >+ catch(Throwable th) { >> > > >> >> > > > >> > log.error("Initializing converter : >> > > >> >> > "+converterClass.getName()+" with property : "+ >> > > >> >> > > > >> > >> > > >> >> > > > >> > property.getPropertyName()+" and value >> > > >> >> > : "+property.getDefaultValue()+" failed."); >> > > >> >> > > > >> > } >> > > >> >> > > > >> >@@ -611,10 +574,8 @@ >> > > >> >> > > > >> > >> > > >> >> > > > >> > >> > > >> >> > > > >> > public synchronized MethodBinding >> > > >> >> > > > >> > createMethodBinding(String >> > > >> >> > reference, Class[] params) >> > > >> >> > > > >> >- throws ReferenceSyntaxException >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >- if ((reference == null) || (reference.length() >> > > >> >> > > > >> >== 0)) >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >+ throws ReferenceSyntaxException { >> > > >> >> > > > >> >+ if ((reference == null) || ( reference.length() >> > > >> >> > > > >> >== 0)) { >> > > >> >> > > > >> > log.error("createMethodBinding: reference = >> > > >> >> > > > >> > null is not >> > > >> >> > allowed"); >> > > >> >> > > > >> > throw new >> > > >> >> > NullPointerException("createMethodBinding: reference = null >> > > >> >> > is not allowed"); >> > > >> >> > > > >> > } >> > > >> >> > > > >> >@@ -626,37 +587,30 @@ >> > > >> >> > > > >> > return new MethodBindingImpl(this, reference, >> > > >> >> > > > >> > params); >> > > >> >> > > > >> > } >> > > >> >> > > > >> > >> > > >> >> > > > >> >- public Validator createValidator(String >> > > >> >> > > > >> >validatorId) throws >> > > >> >> > FacesException >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >- if ((validatorId == null) || >> > > >> >> > > > >> >(validatorId.length() == 0)) >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >+ public Validator createValidator(String >> > > >> >> > > > >> >validatorId) throws >> > > >> >> > FacesException { >> > > >> >> > > > >> >+ if ((validatorId == null) || >> > > >> >> > > > >> >(validatorId.length() == 0)) { >> > > >> >> > > > >> > log.error("createValidator: validatorId = >> > > >> >> > > > >> > null is not >> > > >> >> > allowed"); >> > > >> >> > > > >> > throw new >> > > >> >> > NullPointerException("createValidator: validatorId = null >> > > >> >> > is not allowed"); >> > > >> >> > > > >> > } >> > > >> >> > > > >> > >> > > >> >> > > > >> > Class validatorClass = (Class) >> > > >> >> > _validatorClassMap.get(validatorId); >> > > >> >> > > > >> >- if (validatorClass == null) >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >+ if (validatorClass == null) { >> > > >> >> > > > >> > String message = "Unknown validator id '" + >> > > >> >> > > > >> > validatorId >> > > >> >> > + "'."; >> > > >> >> > > > >> > log.error (message); >> > > >> >> > > > >> > throw new FacesException(message); >> > > >> >> > > > >> > } >> > > >> >> > > > >> > >> > > >> >> > > > >> >- try >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >+ try { >> > > >> >> > > > >> > return (Validator) >> > > >> >> > > > >> > validatorClass.newInstance(); >> > > >> >> > > > >> > } >> > > >> >> > > > >> >- catch (Exception e) >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >+ catch (Exception e) { >> > > >> >> > > > >> > log.error("Could not instantiate validator >> > > >> >> > > > >> > " + >> > > >> >> > validatorClass, e); >> > > >> >> > > > >> > throw new FacesException("Could not >> > > >> >> > > > >> > instantiate >> > > >> >> > validator: " + validatorClass, e); >> > > >> >> > > > >> > } >> > > >> >> > > > >> > } >> > > >> >> > > > >> > >> > > >> >> > > > >> >- public ValueBinding createValueBinding(String >> > > >> >> > > > >> >reference) throws >> > > >> >> > ReferenceSyntaxException >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >- if ((reference == null) || (reference.length() >> > > >> >> > > > >> >== 0)) >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >+ public ValueBinding createValueBinding(String >> > > >> >> > > > >> >reference) throws >> > > >> >> > ReferenceSyntaxException { >> > > >> >> > > > >> >+ if ((reference == null) || (reference.length() >> > > >> >> > > > >> >== 0)) { >> > > >> >> > > > >> > log.error("createValueBinding: reference = >> > > >> >> > > > >> > null is not >> > > >> >> > allowed"); >> > > >> >> > > > >> > throw new >> > > >> >> > NullPointerException("createValueBinding: reference = null >> > > >> >> > is not allowed"); >> > > >> >> > > > >> > } >> > > >> >> > > > >> >@@ -664,23 +618,19 @@ >> > > >> >> > > > >> > } >> > > >> >> > > > >> > >> > > >> >> > > > >> > >> > > >> >> > > > >> >- public String getDefaultRenderKitId() >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >+ public String getDefaultRenderKitId() { >> > > >> >> > > > >> > return _defaultRenderKitId; >> > > >> >> > > > >> > } >> > > >> >> > > > >> > >> > > >> >> > > > >> >- public void setDefaultRenderKitId(String >> > > >> >> > > > >> >defaultRenderKitId) >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >+ public void setDefaultRenderKitId(String >> > > >> >> > > > >> >defaultRenderKitId) { >> > > >> >> > > > >> > _defaultRenderKitId = defaultRenderKitId; >> > > >> >> > > > >> > } >> > > >> >> > > > >> > >> > > >> >> > > > >> >- public StateManager getStateManager() >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >+ public StateManager getStateManager() { >> > > >> >> > > > >> > return _stateManager; >> > > >> >> > > > >> > } >> > > >> >> > > > >> > >> > > >> >> > > > >> >- public void setStateManager(StateManager >> > > >> >> > > > >> >stateManager) >> > > >> >> > > > >> >- { >> > > >> >> > > > >> >+ public void setStateManager(StateManager >> > > >> >> > > > >> >stateManager) { >> > > >> >> > > > >> > _stateManager = stateManager; >> > > >> >> > > > >> > } >> > > >> >> > > > >> > } >> > > >> >> > > > >> > >> > > >> >> > > > >> > >> > > >> >> > > > >> > >> > > >> >> > > > >> >> > > >> >> > > > >> >> > > >> >> > > > >> >> > > >> >> > > > > >> > > >> >> > > > > >> > > >> >> > > > >-- >> > > >> >> > > > > >> > > >> >> > > > >http://www.irian.at >> > > >> >> > > > > >> > > >> >> > > > >Your JSF powerhouse - >> > > >> >> > > > >JSF Consulting, Development and >> > > >> >> > > > >Courses in English and German >> > > >> >> > > > > >> > > >> >> > > > >Professional Support for Apache MyFaces >> > > >> >> > > > > >> > > >> >> > > > >> > > >> >> > > > >> > > >> >> > > > >> > > >> >> > > >> > > >> >> > > >> > > >> >> > > -- >> > > >> >> > > >> > > >> >> > > http://www.irian.at >> > > >> >> > > >> > > >> >> > > Your JSF powerhouse - >> > > >> >> > > JSF Consulting, Development and >> > > >> >> > > Courses in English and German >> > > >> >> > > >> > > >> >> > > Professional Support for Apache MyFaces >> > > >> >> > > >> > > >> >> > >> > > >> >> > >> > > >> >> > >> > > >> >> > -- >> > > >> >> > Grant Smith >> > > >> >> > >> > > >> >> >> > > >> > >> > > >> > >> > > >> >-- >> > > >> > >> > > >> >http://www.irian.at >> > > >> > >> > > >> >Your JSF powerhouse - >> > > >> >JSF Consulting, Development and >> > > >> >Courses in English and German >> > > >> > >> > > >> >Professional Support for Apache MyFaces >> > > >> > >> > > >> >> > > >> >> > > >> >> > > > >> > > > >> > > >-- >> > > > >> > > >http://www.irian.at >> > > > >> > > >Your JSF powerhouse - >> > > >JSF Consulting, Development and >> > > >Courses in English and German >> > > > >> > > >Professional Support for Apache MyFaces >> > > > >> > > >> > > >> > > >> > >> > >> > -- >> > >> > http://www.irian.at >> > >> > Your JSF powerhouse - >> > JSF Consulting, Development and >> > Courses in English and German >> > >> > Professional Support for Apache MyFaces >> > >> >> >> -- >> Matthias Wessendorf >> Aechterhoek 18 >> 48282 Emsdetten >> blog: http://jroller.com/page/mwessendorf >> mail: mwessendorf-at-gmail-dot-com >> > > >-- >Matthias Wessendorf >Aechterhoek 18 >48282 Emsdetten >blog: http://jroller.com/page/mwessendorf >mail: mwessendorf-at-gmail-dot-com >
