This is a sample code:
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
<script type="text/javascript" src="js/DataTable.js"></script>
<h:body>
<h:selectOneMenu value="test1"
styleClass="combobox" id="profileID">
<f:selectItem itemLabel="--Select--" itemValue="--Select--"/>
<f:selectItem itemLabel="Yes" itemValue="Yes"/>
<f:selectItem itemLabel="No" itemValue="No"/>
</h:selectOneMenu>
</h:body>
</ui:composition>
Now when i select an option, i want the minimized dropdown menu rectangle to change it's background color, highlighting the selected option.If i choose 'Yes', the rectangle should turn 'Green', if i select 'No', the rectangle should turn 'Red'. How can this be implemented?