I'm a new member of stackoverflow but since this is the first problem I really can't seem to fix.
I know the question probably is unclear but here is my problem. For our backend application we use JSF. Now there is a p:selectOneMenu with selectItems that are automatically filled (DatabaseServers) but we've added a new attribute (boolean full) and my question now is if it is possible to edit the background-color of the full databases in red and the not full databases in green.
<p:outputLabel for="emrDatabaseServer"
value="#{msg['tenants.label.emrDatabase']}" />
<p:selectOneMenu id="emrDatabaseServer" style="width:250px;"
value="#{tenantController.entity.emrDatabaseServer}"
effect="fade" required="true"
converter="#{databaseServerConverter}">
<f:selectItem itemLabel="Select One" itemValue="" />
<f:selectItems value="#{tenantController.emrDatabaseServers}"
var="emrDB"
itemLabel="#{emrDB.name} (#{emrDB.host}:#{emrDB.port}) (#{emrDB.nbDatabases} dbs)"
itemValue="#{emrDB}" />
<p:ajax event="change"
listener="#{tenantController.onValueChange}" update="save" />
</p:selectOneMenu>
I've tried countless things but it just doesn't seem to work.
I would also like to mention that I don't have the option of using code from other packages and so.