• Post Reply Bookmark Topic Watch Topic
  • New Topic

html tags in property file  RSS feed

 
Rajeev Ravindran
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Could someone tell me how to set HTML tags in the property file.
In my errors.properties i have this value

required.field=<b> Required ! <b>

I wanted to display "Required ! " in bold, but im getting the output as "<b> Required ! <b>".

Thanks,
Rajeev.
 
Jeff Albertson
Ranch Hand
Posts: 1780
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The property file is fine as written, but how are you outputing the string?
Several tags have the attribute escape to indicate whether or not there should be some escape filtering...
 
Sergey Smirnov
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
just use escape="false" for your h: outputText. I.e, for example:



--
Sergey : http://jsfTutorials.net
[ December 29, 2005: Message edited by: Sergey Smirnov ]
 
Rajeev Ravindran
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the replies, I think i should have been more specific !

here is my propery file entry

javax.faces.component.UIInput.REQUIRED= <b> * </b>
javax.faces.component.UIInput.REQUIRED_detail= is a required field.

I'm making use of faces component to read from the property file.

what i have in my jsp is


is there any "escape" property for h:message ?

Im pretty new to JSF. I'm not sure if i make any sense !

Thanks again,
Rajeev.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!