jsf display sring in 2 colors

i have

IN JSP/JSF

<table style="border: none; width: 100%;" class="bgcolor">

<tr>

<td align="right" width="150px" >

<STRONG> <span class="required">*</span> Survey Target</STRONG>

</td>

<td align="left">

<h:selectOneRadio style="border-bottom: 0;border-right: 0;" id="surveyTargetId" value="#{proxySurveyBean.surveyTargetId}" layout="pageDirection">

<f:selectItems value="#{proxySurveyBean.surveyTargetItems}" id="surveyTargetItems" />

</h:selectOneRadio>

</td>

</tr>

</table>

IN BEAN

SelectItem[] surveyTarget = {

new SelectItem("peer",

"Peer(individuals evaluate their peers)"),

new SelectItem("self",

"Self(individuals evaluate themselves) "),

new SelectItem("author",

"Author(Participants evaluate author) ") };

Peer(individuals evaluate their peers)"),

i have a radio label in which want Peer string in black color and rest in the blue color . Please suggest

Thanks

[1114 byte] By [Pinintya] at [2007-10-2 19:45:50]
# 1
I Think that is not possible with the standard components. The solution is to create a custom component.
pringia at 2007-7-13 22:24:26 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

I have used conditional statements in components to control styles, though never with a select one radio.

Pringi is probably correct, but if you want to give it a shot anyway, here's how I do it with a column in a datatable:

<h:datatable var="data" ...>

<h:column>

<h:outputText value="#{data.revenue}" style="#{data.revenue ge 0 ? 'color:Black;' : 'color:Red;'}">

</h:column>

</h:datable>

Message was edited by:

James_R

James_Ra at 2007-7-13 22:24:26 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...