Return-Path: X-Original-To: apmail-myfaces-dev-archive@www.apache.org Delivered-To: apmail-myfaces-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C7B6B90AE for ; Fri, 11 Nov 2011 00:28:13 +0000 (UTC) Received: (qmail 64195 invoked by uid 500); 11 Nov 2011 00:28:13 -0000 Delivered-To: apmail-myfaces-dev-archive@myfaces.apache.org Received: (qmail 64126 invoked by uid 500); 11 Nov 2011 00:28:13 -0000 Mailing-List: contact dev-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Development" Delivered-To: mailing list dev@myfaces.apache.org Received: (qmail 64119 invoked by uid 99); 11 Nov 2011 00:28:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Nov 2011 00:28:13 +0000 X-ASF-Spam-Status: No, hits=-2001.2 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Nov 2011 00:28:11 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 9173A4D25D for ; Fri, 11 Nov 2011 00:27:51 +0000 (UTC) Date: Fri, 11 Nov 2011 00:27:51 +0000 (UTC) From: "Leonardo Uribe (Commented) (JIRA)" To: dev@myfaces.apache.org Message-ID: <1486522898.19543.1320971271597.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1625338908.13526.1320829671585.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (EXTVAL-138) Make an helper class to configure Myfaces validator MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/EXTVAL-138?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1314= 8157#comment-13148157 ]=20 Leonardo Uribe commented on EXTVAL-138: --------------------------------------- In JSF 2, there exists a key over application map to do that: /** * The key in the ServletContext where the Bean Validation Factory can = be found. * In a managed Java EE 6 environment, the container initializes the Va= lidatorFactory * and stores it in the ServletContext under this key. * If not present, the manually instantiated ValidatorFactory is stored= in the ServletContext * under this key for caching purposes. */ public static final String VALIDATOR_FACTORY_KEY =3D "javax.faces.valid= ator.beanValidator.ValidatorFactory"; I checked myfaces-bundle to see if javax.el package is imported (detect UEL= ) and it is correct, so in theory I don't see why a helper class could be n= ecessary here. But I see that in myfaces-bundle there is no optional entry for javax.valid= ation as import in MANIFEST.MF file . Checking api/pom.xml it is there, but= on bundle/pom.xml it is not, so I suppose that's the cause of the problem. =20 > Make an helper class to configure Myfaces validator > --------------------------------------------------- > > Key: EXTVAL-138 > URL: https://issues.apache.org/jira/browse/EXTVAL-138 > Project: MyFaces Extensions Validator > Issue Type: New Feature > Components: Bean Validation > Environment: equinox/Felix > Reporter: Charlie Mordant > > Hi, > I made bean validation working well in an osgi environment.=20 > The problem is that it need to export the validator 'by hand'. > As myfaces detects Hibernate validator automatically detected Hibernate i= mplementation, I'm not able to wire these two framework. > It would be cool to make and helper class allowing to manually wire jsr 3= 03 implementation and Myfaces. > I made an example of a running bean validation implementation in an osgi = environment: > http://hudson.osgiliath.net/job/orthank-sample%20Tag/ws/ > In order to compile, you juste need to have maven 3 and run: mvn clean in= stall -DskipTests=3Dtrue (integration tests are not stable for now). > then, in order to launch run: mvn pax:provision -Dframework=3Dequinox (or= -Dframework=3Dfelix) and point your browser to http://localhost:8080/net.o= sgiliath.orthank-sample.java.web.simple_1.0.1.SNAPSHOT > You'll be able to say hello with web services. > You can d=C3=A9sactivate ws client module to run it without ws. > To test validation, try to enter an empty text in the input, you'll be re= directed to an error page. > If Myfaces had this helper, a validation message could be shown to the us= er. > Regards, Charlie (tcharl on twitter, cmordant1@gmail.com on gtalk)=20 -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs: https://issues.apache.org/jira/secure/ContactAdministrators!default.jsp= a For more information on JIRA, see: http://www.atlassian.com/software/jira