Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to represent text value into image  RSS feed

 
Tariq Ahsan
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!

I have jsf where in one of the data table displays among other values retrieved from a database query is 'status'. Currently this status column displays the value of either '1', '2' or '3'. I have 3 gif images of green, yellow and red. How can I represent these 1, 2 & 3s into corresponding green, yellow and red gif images?

Here's the part of the jsf page where status value is displayed -

<h:column id="T5column2">
<f:facet name="header">
<hutputText styleClass="MyoutputTextWhite" value="Status"
id="T5text3"></hutputText>
</f:facet>
<hutputText styleClass="outputText" id="T5text4 value="#{varDataRow.i_STATUS}">
</hutputText>
</h:column>

I am a newbie in JSF. Would really appreciate if I can get some lead on this. It would be great to get some examples if possible.

Thanks!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!