public void removeRequired(JQMFormWidget widget) { if (widget == null) return; Collection<Validator> validators = widgetValidators.get(widget); if (validators == null) return; Validator notNullV = null; List<Validator> notNullLst = null; Iterator<Validator> iter = validators.iterator(); while (iter.hasNext()) { Validator validator = iter.next(); if (validator instanceof NotNullOrEmptyValidator) { if (notNullV == null) notNullV = validator; else { if (notNullLst == null) notNullLst = new ArrayList<Validator>(); notNullLst.add(validator); } } } if (notNullV != null) removeValidator(widget, notNullV); if (notNullLst != null) { for (Validator v : notNullLst) removeValidator(widget, v); } }
public void removeRequired(JQMFormWidget widget) { if (widget == null) return; Collection<Validator> validators = widgetValidators.get(widget); if (validators == null) return; Validator notNullV = null; List<Validator> notNullLst = null; Iterator<Validator> iter = validators.iterator(); while (iter.hasNext()) { Validator validator = iter.next(); if (validator instanceof NotNullOrEmptyValidator) { if (notNullV == null) notNullV = validator; else { if (notNullLst == null) notNullLst = new ArrayList<Validator>(); notNullLst.add(validator); } } } if (notNullV != null) removeValidator(widget, notNullV); if (notNullLst != null) { for (Validator v : notNullLst) removeValidator(widget, v); } }
public void removeRequired(JQMFormWidget widget) { if (widget == null) return; Collection<Validator> validators = widgetValidators.get(widget); if (validators == null) return; Validator notNullV = null; List<Validator> notNullLst = null; Iterator<Validator> iter = validators.iterator(); while (iter.hasNext()) { Validator validator = iter.next(); if (validator instanceof NotNullOrEmptyValidator) { if (notNullV == null) notNullV = validator; else { if (notNullLst == null) notNullLst = new ArrayList<Validator>(); notNullLst.add(validator); } } } if (notNullV != null) removeValidator(widget, notNullV); if (notNullLst != null) { for (Validator v : notNullLst) removeValidator(widget, v); } }