This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JSF and the fly likes parsing html in dataTable Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "parsing html in dataTable" Watch "parsing html in dataTable" New topic
Author

parsing html in dataTable

Ayub ali khan
Ranch Hand

Joined: Oct 20, 2005
Posts: 378
    
    2
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


SCEA part I,TOGAF Foundation
Leonardo Rafaeli
Ranch Hand

Joined: Dec 12, 2005
Posts: 58
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


SCJP 1.4, SCWCD 1.4, SCBCD 5, OCUP, SCEA 5 (I), Oracle SOA Implementation Specialist, IBM Websphere Lombardi 7.1 Fundamentals
Blog: [url]http://www.leozin.com.br/blog[/url]
Krishna Srinivasan
Ranch Hand

Joined: Jul 28, 2003
Posts: 1803
You can use verbatim tag to include the html or plain text.

http://www.javabeat.net/code/2007/09/jsf-iterate-row-using-datatable/


Krishna Srinivasan
OCAJP Mock Questions
Ayub ali khan
Ranch Hand

Joined: Oct 20, 2005
Posts: 378
    
    2
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
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: parsing html in dataTable
 
Similar Threads
Javascript document object writes in a new page?
How servlet response is commited?
a question about bean
Can somebody give me an example
regarding scriptlets