Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to stop Richfaces replace <> with &lt; and &gt;

 
Dheeman Basu
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to show a hyperlinks in Richface datatable.
Say for simplicity all my links are: <a href="http://www.javaranch.com"> Click Here </a>

Now let's say table is defined like following:

<rich:dataTable
var="rec" value="#{beanList.records}"
rowClasses="jsf-table-odd, jsf-table-even">

<f:facet name="header">
<rich:columnGroup id="dataHeaderColGrp">
<rich:column> <h:outputText value="Links"/></rich:column>
</rich:columnGroup>
</f:facet>

<rich:column title="Links">
<h:outputText value="#{rec.text}" /></rich:column>
</rich:dataTable>


What should be the content of rec.text? In other words what must bean's getText() method return?
 
Kavita Tipnis
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you looked at output link component(h: outputLink) ??
 
Rohit Boorugu
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey why don't you do this


you can also use target="_blank" to open in a new window.
instead of this
<rich:column title="Links">
<hutputText value="#{rec.text}" /></rich:column>
</rich:dataTable>

Hope this Helps
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic