This content has been marked as final.
Show 2 replies
-
1. Re: Change required attribute of Rich Calendar
ilya_shaikovsky Jul 16, 2009 5:06 AM (in response to oneworld95)how about to define required with EL?
-
2. Re: Change required attribute of Rich Calendar
oneworld95 Jul 16, 2009 8:18 AM (in response to oneworld95)Thanks. That's what ended up working. Hope this helps anyone else working on something similar. Here's the working code:
<h:selectOneMenu id="lstEmployeeStatus" value="#{newemployee.employeeStatus}" required="true" requiredMessage="Employee Status is required."> <f:selectItems value="#{newemployee.employeeStatusItems}"/> <a4j:support event="onchange" reRender="renderPanel" ajaxSingle="true"/> </h:selectOneMenu> <a4j:outputPanel id="renderPanel" ajaxRendered="true"> <h:outputLabel styleClass="#{newemployee.employeeStatus == 'Permanent' ? '' : 'required'}" value="Tentative End Date (for contract or temp employee, intern, or volunteer)" for="calTentativeEndDate" /> <rich:calendar id="calTentativeEndDate" required="#{newemployee.employeeStatus == 'Permanent' ? false : true}" value="#{newemployee.tentativeEndDate}" requiredMessage="Tentative End Date is required." datePattern="MM-dd-yyyy" /> <rich:message for="calTentativeEndDate" styleClass="errors" /> </a4j:outputPanel>