1 include(bbq.web.Browser);
  2 
  3 bbq.gui.form.behaviour.ValidateOnBlurBehaviour = new Class.create(/** @lends bbq.gui.form.behaviour.ValidateOnBlurBehaviour.prototype */ {
  4 
  5 	/**
  6 	 * Causes validation of the field's value to occur then it loses focus.
  7 	 *
  8 	 * @constructs
  9 	 */
 10 	initialize: function() {
 11 		
 12 	},
 13 
 14 	/**
 15 	 * Sets the field on which this behaviour operates
 16 	 *
 17 	 * @param {bbq.gui.form.FormField} field
 18 	 */
 19 	setField: function(field) {
 20 		Element.observe(field.getRootNode(), "blur", function() {
 21 			try {
 22 				field.getValue();
 23 			} catch(e) {
 24 				Log.info("error while blurring", e);
 25 			}
 26 		});
 27 	}
 28 });
 29