I have added the validateMultiple tag from last Omnifaces 1.7 release, and for some reason it causes my application to refresh the view continously.
I would like to validate several time fields with my custom validator.
This is the code snippet I'm using:
<o:validateMultiple id="addTODValidator"
components="startTimePicker endTimePicker"
validator="#{TODIntervalValidator.validateValues}"
message="time interval"
/>
<pe:timePicker id="startTimePicker"
value="#{TimeOfDayBranchAddNodeController.startTOD}" mode="spinner"
showOn="button" label="Spinner time picker with button"
disabled="#{TimeOfDayBranchAddNodeController.otherSelected}"
widgetVar="startTimeWidget"/>
<h:outputText value="EndTime" />
<pe:timePicker id="endTimePicker"
value="#{TimeOfDayBranchAddNodeController.endTOD}" mode="spinner"
showOn="button" label="Spinner time picker with button"
disabled="#{TimeOfDayBranchAddNodeController.otherSelected}"
widgetVar="endTimeWidget"
/>
And the managed bean with the custom logic:
@ManagedBean(name = "TODIntervalValidator")
@RequestScoped
public class TODValidator implements MultiFieldValidator{
@ManagedProperty(value = "#{addNodeDialogController}")
private AddNodeDialogController addNodeDialogController;
public boolean validateValues(FacesContext context, List<UIInput> components, List<Object> values) {
Anyone with experience on this new feature? BalusC any ideas?
Thanks in advance