/ Published in: Other
Credits to Jeff Douglas
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<apex:pageBlockSectionItem > <apex:outputLabel value="Category 1" for="cbxlevel1"/> <apex:outputPanel styleClass="requiredInput" layout="block"> <apex:outputPanel styleClass="requiredBlock" layout="block"/> <apex:selectList value="{!selectedLevel1}" id="cbxlevel1" size="1" required="true"> <apex:selectOptions value="{!level1items}"/> <apex:actionSupport event="onchange" rerender="cbxlevel2"/> </apex:selectList> </apex:outputPanel> </apex:pageBlockSectionItem>
URL: http://blog.jeffdouglas.com/2008/11/16/displaying-the-required-red-bar-for-a-control/