You don't have to write a whole Renderer. Just overrite HtmlInputTestRenderer.encodeBegin and write a <span> before calling super.encodeBegin() (two lines of code). Then, register your renderer in faces-config as javax.faces.Text (IIRC) to override the default MyFaces renderer.
Total amount of work: 2-3 lines of code in each file. -----Mensaje original----- De: Michael Ageeb [mailto:[EMAIL PROTECTED] Enviado el: martes, 27 de junio de 2006 15:49 Para: MyFaces Discussion Asunto: Re: Adding star while rendering all required InputText -----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:[EMAIL PROTECTED] > 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-----

