context:   registerForm : function(form) {    form = $(form);        form.errorDiv = $(form.id + ':errors');        if (form.errorDiv) {      form.errorList = form.errorDiv.getElementsBySelector("UL").first();            Tapestry.hideInvisible(form.errorDiv);	}        // This can probably be cleaned up with bind() ...        form.onsubmit = function() {      var event = new Tapestry.FormEvent(form);      form.firstError = true;    	  if (form.errorList) {  	    form.errorList.innerHTML = '';  	  }	  // Locaate elements that have an event manager (and therefore, validations)	  // and let those validations execute, which may result in calls to recordError().	        form.getElements().each(function(element) {         if (element.fieldEventManager != undefined) {          event.field = element;          element.fieldEventManager.validateInput(event);                    if (event.abort) throw $break;        }           });// window.alert("result = " + event.result);	  // On a failure result, display the error div.	  	  if (form.errorDiv) {	    if (event.result) {	      if (form.errorDiv.visible()) 	        new Effect.BlindUp(form.errorDiv);	      	    } 	    else if (! form.errorDiv.visible()) {	        new Effect.BlindDown(form.errorDiv);	      }	  }	          return event.result;    };             form.recordError = function(field, event, message) {      if (form.firstError) {                     field = $(field);        if (field.focus) field.focus();        if (field.select) field.select();                form.firstError = false;      }                if (form.errorList)     	new Insertion.Bottom(form.errorList, "<li>" + message + "</li>");          };  },
meta: 3915	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/3915/3708d3d7d4f1f3668f54533bf3e6ab479d5dfbe1/tapestry.js/clean/tapestry-core/src/main/resources/org/apache/tapestry/tapestry.js