wood burning stoves 2.0*
The moose likes JSF and the fly likes <hx:dataTableEx how to display an image based on column data Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "<hx:dataTableEx how to display an image based on column data" Watch "<hx:dataTableEx how to display an image based on column data" New topic
Author

<hx:dataTableEx how to display an image based on column data

Dan MacLeod
Ranch Hand

Joined: Mar 19, 2009
Posts: 30
I'm new to JSF, hope this isn't too stupid of a question.

I have a <hx:dataTableEx> datatable and I would like to display an image in a column if the column data is a certain value.

For example: if my table contains a column that maps back to myBean.alert and alert is set to true, I want to display an image in the column, if alert is set to false, don't display anything.

Any help would be greatful

Thanks
Dan


Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
Make use of the 'rendered' attribute.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: <hx:dataTableEx how to display an image based on column data
 
Similar Threads
Help with sorting
How can I force a <hx:dataTableEx to display n number of rows?
java.lang.NumberFormatException when sorting table column
Png-files doesn't appear in Alert()
<hx:CommanExRowEdit> and JavaScript issue