hi reto,

first of all: welcome @ myfaces!

you are welcome to provide the patch for such an improvement (just attach
it to a jira ticket).

regards,
gerhard

http://www.irian.at

Your JSF/JavaEE powerhouse -
JavaEE Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces



2013/1/29 Reto Weiss <reto.we...@ivyteam.ch>

> Hi
>
> I'm using MyFaces (2.1.10) with ExtVal (2.0.6). As RenderKit's I use
> Primefaces and Primefaces Mobile. This does not work because the class
>
>
> org.apache.myfaces.extensions.validator.core.renderkit.DefaultRenderKitWrapperFactory
>
> is not able to handle more than one RenderKit. This is because the method
> createWrapper caches the first RenderKit it wrappes. After that it returns
> the cached RenderKit even if the RenderKit to wrap is another one than the
> cached one.
>
> I have fixed this in my project by providing my own
> RenderKitWrapperFactory:
>
> class IvyExtValRenderKitWrapperFactory extends
> AbstractRenderKitWrapperFactory
> {
>   private HashMap<RenderKit, ExtValRenderKit> wrappers = new
> HashMap<RenderKit, ExtValRenderKit>();
>
>   @Override
>   protected synchronized RenderKit createWrapper(RenderKit renderKit)
>   {
>     ExtValRenderKit wrapper = wrappers.get(renderKit);
>     if (wrapper == null)
>     {
>       wrapper = new ExtValRenderKit(renderKit);
>       wrappers.put(renderKit, wrapper);
>     }
>     return wrapper;
>   }
>
> }
>
> Do I make something wrong or is this a bug? Should I report an issue?
>
> Regards
>
> Reto Weiss
> Product Owner / Developer Xpert.ivy
>
> ivyTeam AG
> Alpenstrasse 9
> 6300 Zug
>
>
>

Reply via email to