You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Michael Ageeb <mi...@acm.org> on 2006/06/27 11:50:20 UTC

Adding star while rendering all required InputText

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,
   Is there a way to render a red star concatenated to any InputText
with the required attribute set to true?

I've an application with a lot of those InputText with their required
set to true and I don't want to change the code for each manually .
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFEoP9bs6YiuH6FszARAotVAJ4jC7LKvwHQlYUHF8IPk6R+66xlngCeJFKI
yY2O3GnNfdnwus48RUfcTss=
=d+8u
-----END PGP SIGNATURE-----


Re: Adding star while rendering all required InputText

Posted by Cagatay Civici <ca...@gmail.com>.
Hi,

Yes there is, you only need to provide your custom renderer for the job. You
can grab the source of your renderer class and decorate it to render a *
symbol if the component is required.

Regards,

Cagatay

On 6/27/06, Julian Ray <ju...@yahoo.com> wrote:
>
> You can add a properties file which overrides the default messages. Here
> are
> some that we have used in the past
>
> javax.faces.component.UIInput.REQUIRED=* value required.
> javax.faces.component.UIInput.CONVERSION=* invalid.
> javax.faces.validator.NOT_IN_RANGE=* value must be between {0} and {1}.
> javax.faces.validator.LongRangeValidator.TYPE=* must be a number.
> javax.faces.convert.IntegerConverter.CONVERSION=* must be a valid number.
> javax.faces.convert.DoubleConverter.CONVERSION=* must be a valid number.
>
> -----Original Message-----
> From: Michael Ageeb [mailto:michaelag@acm.org]
> Sent: Tuesday, June 27, 2006 5:50 AM
> To: MyFaces Discussion
> Subject: Adding star while rendering all required InputText
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello,
>    Is there a way to render a red star concatenated to any InputText with
> the required attribute set to true?
>
> I've an application with a lot of those InputText with their required set
> to
> true and I don't want to change the code for each manually .
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2 (GNU/Linux)
> Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org
>
> iD8DBQFEoP9bs6YiuH6FszARAotVAJ4jC7LKvwHQlYUHF8IPk6R+66xlngCeJFKI
> yY2O3GnNfdnwus48RUfcTss=
> =d+8u
> -----END PGP SIGNATURE-----
>
>

Re: Adding star while rendering all required InputText

Posted by Michael Ageeb <mi...@acm.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Actually I want the star to be concatenated to the InputText before
the user submits and process the validation I want it be concatenated
in the early render phase. something that is not as complex as
creating a custom render
Julian Ray wrote:
> You can add a properties file which overrides the default messages.
Here are
> some that we have used in the past
>
> javax.faces.component.UIInput.REQUIRED=* value required.
> javax.faces.component.UIInput.CONVERSION=* invalid.
> javax.faces.validator.NOT_IN_RANGE=* value must be between {0} and {1}.
> javax.faces.validator.LongRangeValidator.TYPE=* must be a number.
> javax.faces.convert.IntegerConverter.CONVERSION=* must be a valid number.
> javax.faces.convert.DoubleConverter.CONVERSION=* must be a valid number.
>
> -----Original Message-----
> From: Michael Ageeb [mailto:michaelag@acm.org]
> Sent: Tuesday, June 27, 2006 5:50 AM
> To: MyFaces Discussion
> Subject: Adding star while rendering all required InputText
>
> Hello,
>    Is there a way to render a red star concatenated to any InputText
> with
> the required attribute set to true?
>
> I've an application with a lot of those InputText with their
> required set to
> true and I don't want to change the code for each manually .
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFEoTc1s6YiuH6FszARArD8AJ9CPjJHAbfCO73A4LATFs8u8/qbMgCbBCYw
EwE6YtulLtEmrBVwQ9GVKHo=
=900W
-----END PGP SIGNATURE-----


RE: Adding star while rendering all required InputText

Posted by Julian Ray <ju...@yahoo.com>.
You can add a properties file which overrides the default messages. Here are
some that we have used in the past

javax.faces.component.UIInput.REQUIRED=* value required.
javax.faces.component.UIInput.CONVERSION=* invalid.
javax.faces.validator.NOT_IN_RANGE=* value must be between {0} and {1}.
javax.faces.validator.LongRangeValidator.TYPE=* must be a number.
javax.faces.convert.IntegerConverter.CONVERSION=* must be a valid number.
javax.faces.convert.DoubleConverter.CONVERSION=* must be a valid number. 

-----Original Message-----
From: Michael Ageeb [mailto:michaelag@acm.org] 
Sent: Tuesday, June 27, 2006 5:50 AM
To: MyFaces Discussion
Subject: Adding star while rendering all required InputText

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,
   Is there a way to render a red star concatenated to any InputText with
the required attribute set to true?

I've an application with a lot of those InputText with their required set to
true and I don't want to change the code for each manually .
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFEoP9bs6YiuH6FszARAotVAJ4jC7LKvwHQlYUHF8IPk6R+66xlngCeJFKI
yY2O3GnNfdnwus48RUfcTss=
=d+8u
-----END PGP SIGNATURE-----