Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

parsing html in dataTable  RSS feed

 
Ayub ali khan
Ranch Hand
Posts: 395
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a requirement where the actual column data in HTMLDataTable should be parsed as html page.

for example the contents of HTML column are <html>
<body>

Hello
</body>
</html>

then the column should be displayed as Hello. If there are any style attributes, these should also be applied. Can any one give some tips on this ?

Thanks and Regards
Ayub
 
Leonardo Rafaeli
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
there are a lot of ways, like:

- you can add a verbatim tag inside your column tag
- using t:htmlTag of tomahawk
- using facelets (just put the html code inside your column tag)
- again, using tomahawk, there are some html-jsf tags, like t:document (it renders a html tag) and t:documentBody (a body html tag)
- etc
 
Krishna Srinivasan
Ranch Hand
Posts: 1879
Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use verbatim tag to include the html or plain text.

http://www.javabeat.net/code/2007/09/jsf-iterate-row-using-datatable/
 
Ayub ali khan
Ranch Hand
Posts: 395
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much for the advice.

We were generating the JSF pages at runtime and also the table was built at runtime using java classes. I used .isEscape method of UIComponentBuilder class.

Thank you very much for giving the clues.

Regards
Ayub
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!