From users-return-60441-apmail-myfaces-users-archive=myfaces.apache.org@myfaces.apache.org Tue Jan 29 23:38:37 2013 Return-Path: X-Original-To: apmail-myfaces-users-archive@www.apache.org Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 46623E66C for ; Tue, 29 Jan 2013 23:38:37 +0000 (UTC) Received: (qmail 31770 invoked by uid 500); 29 Jan 2013 23:38:36 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 31727 invoked by uid 500); 29 Jan 2013 23:38:36 -0000 Mailing-List: contact users-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Discussion" Delivered-To: mailing list users@myfaces.apache.org Received: (qmail 31717 invoked by uid 99); 29 Jan 2013 23:38:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Jan 2013 23:38:36 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of smithh032772@gmail.com designates 74.125.82.175 as permitted sender) Received: from [74.125.82.175] (HELO mail-we0-f175.google.com) (74.125.82.175) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Jan 2013 23:38:31 +0000 Received: by mail-we0-f175.google.com with SMTP id x8so760906wey.6 for ; Tue, 29 Jan 2013 15:38:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=41bFQ+txmIagLcNOVXDxmJMLk+c2Nmkzu688AR18rso=; b=Oq8l7xZX7WaPVlLY0saYOCNPXgAeGNmpb2Yn2m2yhgyWWoulInijAKUE7cGjwYXn/K M5+h+ft8FxTBEocexy8BsEJZ2eaNpiOjci8ySaljXdAdgmyFDR5YQbVFmFKvgJttYL+7 o51VwwyVlExAllW388aGyketkvnCyh2z1b7mig/WDUOKJQAzpUs3tR6bvqrxN0uUPW87 v8ADQlXRGyvC6w/klw9fjxMBY2v7KjN+mvBaQT7kGu5ox1c2DyGSPwqUJEEaHrtn+J9Z hP4wELA9RgOXE/TG8BJr0SrizaLDJbtXj4K5LaaDDygnXIRF48oXEJomliihizahDKsY G9Rw== MIME-Version: 1.0 X-Received: by 10.195.12.42 with SMTP id en10mr5415058wjd.24.1359502690655; Tue, 29 Jan 2013 15:38:10 -0800 (PST) Received: by 10.194.140.82 with HTTP; Tue, 29 Jan 2013 15:38:10 -0800 (PST) In-Reply-To: <4DFB27460A8D284FA2FAC5FCA5E6D85221CAC36C@SWBNTSRV26.soreco.wan> References: <4DFB27460A8D284FA2FAC5FCA5E6D85221CAC36C@SWBNTSRV26.soreco.wan> Date: Tue, 29 Jan 2013 18:38:10 -0500 Message-ID: Subject: Re: ExtVal with multiple RenderKit's (Primeface + Primeface Mobile) does not work correctly From: "Howard W. Smith, Jr." To: MyFaces Discussion Content-Type: multipart/alternative; boundary=047d7bfd017cf29d8804d475e24a X-Virus-Checked: Checked by ClamAV on apache.org --047d7bfd017cf29d8804d475e24a Content-Type: text/plain; charset=ISO-8859-1 On Tue, Jan 29, 2013 at 6:11 AM, Reto Weiss wrote: > 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 wrappers = new > HashMap(); > > @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; > } > > } > > > Yes, please report and thanks for providing that patch! I was in a very lengthy discussion with someone else about this issue...almost a year ago.[1] This is good news! I hope you shared the same in PrimeFaces Mobile (community) forum as well. [1] http://forum.primefaces.org/viewtopic.php?f=8&t=19910&start=10#p62149 --047d7bfd017cf29d8804d475e24a--