Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

HTML tags in JSF

 
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys,

I have a JSF page where I'm outputting some text into a dataList (Tomohawk) i.e. a result from a form submission. I want to be able to format the the output i.e. use the <br>, <a href...> or <p> html tag inside the dataList. However JSF doesn't seem to be recognising the html tags.

Hence I've used the <f:verbatim> to insert the <br> tag, see below



Is the method correct, it seems to work.
What I dont want is for it to have repurcussions later on when my app becomes much more complex.

Thanks for your thoughts in advance, regards
Zein
 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Got to ask why are you using html tags?

Why not instead of <a href="" /> use <h:commandLink />?

John
 
Zein Nunna
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ahh yes John that was an oversight. <a:href .... shouldn't have been there. My main issue was the <br>, if put that there without the <f:verbatim> tags, it is ignored. Hence my question in essence is <f:verbatim> really neccasary if I just want to put need a <br> or <p>?

I hope that makes sense, essentially I have a loop and after each iteration I need a gap between what is output hence <br> or <p>.

Thanks for your thoughts
Zein
 
John Bartlett
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ah ok. have you tried <br /> and <p />?
[ June 08, 2007: Message edited by: John Bartlett ]
 
Yes, my master! Here is the tiny ad you asked for:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic