Return-Path: Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: (qmail 98515 invoked from network); 4 Apr 2007 09:28:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Apr 2007 09:28:18 -0000 Received: (qmail 21735 invoked by uid 500); 4 Apr 2007 09:28:19 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 21707 invoked by uid 500); 4 Apr 2007 09:28:19 -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 21696 invoked by uid 99); 4 Apr 2007 09:28:19 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Apr 2007 02:28:19 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of balteo@gmail.com designates 66.249.92.168 as permitted sender) Received: from [66.249.92.168] (HELO ug-out-1314.google.com) (66.249.92.168) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Apr 2007 02:28:10 -0700 Received: by ug-out-1314.google.com with SMTP id j3so561680ugf for ; Wed, 04 Apr 2007 02:27:49 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=FEv0OcObSHV5NVx+zsPxRliKw0A9tnlZJlf5R/GGxzCm4RXLIkcIOMJFnGts2014gmG3bd6a0zWvl234th8h4Tnzi37IQ9WeY6nnM8CZw2uVtGnkLC1JRU0sc1NuSfLX3Jy9PEdCWEWGC7AeuEZl5c6vnjjVTJOeEj8fKTWB7xQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=T9xKXCiZ9XQ7ROGTLbOvwSJG3q8OtbHAv4DY9JEqM6sNh9XZl1HaBzTXhWYywfl2b4/UDdQbbuCMkV6KZbEcsTpKy6xXolCZdysfHQYgzAusrq5VHmJ9bp2VCEPEOqp3akGreUnvo8Jy9eRLFZG/l/LF2wh5hrV6wiPZDaftBsk= Received: by 10.114.126.1 with SMTP id y1mr190533wac.1175678867921; Wed, 04 Apr 2007 02:27:47 -0700 (PDT) Received: by 10.115.109.17 with HTTP; Wed, 4 Apr 2007 02:27:47 -0700 (PDT) Message-ID: <1460a1a20704040227w24cde9a3gb1318189c058334@mail.gmail.com> Date: Wed, 4 Apr 2007 11:27:47 +0200 From: "Julien Martin" To: "MyFaces Discussion" Subject: Re: Validation/rendering strategy In-Reply-To: <46136AA3.5030306@oma.be> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_27334_29956916.1175678867475" References: <1460a1a20704040122s4b01f41boedb201d1cccdf8cc@mail.gmail.com> <46136AA3.5030306@oma.be> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_27334_29956916.1175678867475 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Is there not a simpler way?? J. 2007/4/4, David Delbecq : > > Probably this may fits your need? > > > > > > > If not, then you will have to write a custom component that does it for > you (locate component, check if it has an inputValue, check validity and > only renders content if needed): > > > > > > > En l'instant pr=E9cis du 04/04/07 10:22, Julien Martin s'exprimait en ces > termes: > > Hello, > > > > I would like for an outputText element to be hidden (i.e. not > > rendered) when the corresponding inputText element has input and > > validated (by a standard tag-based validator). Is that possible? > > > > > > > > > > > > > > > > > > Thanks in advance, > > > > Julien. > > ------=_Part_27334_29956916.1175678867475 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Is there not a simpler way??
J.

= 2007/4/4, David Delbecq <delbd+j= akarta@oma.be>:
Probably this may fits your need?

<h:messages for=3D"age&quo= t;/>
<h:inputText id=3D"age" value=3D"#{ MyBean.age= }" required=3D"true">
<f:validateLongRange minimum= =3D"5"/><!-- Notice that this is not an inline
validator -->
</h:inputText>

If not, then you will h= ave to write a custom component that does it for
you (locate component, = check if it has an inputValue, check validity and
only renders content i= f needed):
<my:incorrectOrEmpty for=3D"age">
<h:outputText .= ../>
</my:incorrectOrEmpty>
<h:inputText id=3D"age&q= uot;.../>


En l'instant pr=E9cis du 04/04/07 10:22, Julien= Martin s'exprimait en ces
termes:
> Hello,
>
> I would like for an outputText e= lement to be hidden (i.e. not
> rendered) when the corresponding inpu= tText element has input and
> validated (by a standard tag-based vali= dator). Is that possible?
>
>
> <h:outputText id=3D"age-label" render= ed=3D"??" value=3D"Fill in your age"/>
> <h= :inputText id=3D"age" value=3D"#{ MyBean.age}" required= =3D"true">
> <f:validateLongRange minimum=3D"5"/><!-- Notice= that this is not an
> inline validator -->
> </h:inputTe= xt>
>
>
> Thanks in advance,
>
> Julien.


------=_Part_27334_29956916.1175678867475--