• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

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 ]
 
She's brilliant. She can see what can be and is not limited to what is. And she knows this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic