rem: var obj=wicketGet(elementId); obj.onblur=function(event){ hideAutoComplete(); }  obj.onkeydown=function(event){ switch(wicketKeyCode(getEvent(event))){ case KEY_UP: if(selected>-1)selected--; if(selected==-1){ hideAutoComplete(); } else { render(); } if(navigator.appVersion.indexOf('AppleWebKit')>0)return killEvent(event); break; case KEY_DOWN: if(selected<elementCount-1){ selected++; } if(visible==0){ updateChoices(); } else { render(); showAutoComplete(); } if(navigator.appVersion.indexOf('AppleWebKit')>0)return killEvent(event); break; case KEY_ESC: hideAutoComplete(); return killEvent(event); break; case KEY_ENTER: if(selected>-1){ obj.value=getSelectedValue(); hideAutoComplete(); } return killEvent(event); break; default: } }   obj.onkeyup=function(event){ switch(wicketKeyCode(getEvent(event))){ case KEY_ENTER: return killEvent(event); case KEY_UP: case KEY_DOWN: case KEY_ESC: case KEY_TAB: case KEY_RIGHT: case KEY_LEFT: break; default: updateChoices(); } }   obj.onkeypress=function(event){ if(wicketKeyCode(getEvent(event))==KEY_ENTER){ return killEvent(event); } }  if(window.addEventListener){ window.addEventListener("load",initializeDiv,false); } else if(window.attachEvent){ window.attachEvent("onload",initializeDiv); } } 
add: var obj=wicketGet(elementId); obj.onblur=function(event){ hideAutoComplete(); }  obj.onkeydown=function(event){ switch(wicketKeyCode(getEvent(event))){ case KEY_UP: if(selected>-1)selected--; if(selected==-1){ hideAutoComplete(); } else { render(); } if(navigator.appVersion.indexOf('AppleWebKit')>0)return killEvent(event); break; case KEY_DOWN: if(selected<elementCount-1){ selected++; } if(visible==0){ updateChoices(); } else { render(); showAutoComplete(); } if(navigator.appVersion.indexOf('AppleWebKit')>0)return killEvent(event); break; case KEY_ESC: hideAutoComplete(); return killEvent(event); break; case KEY_ENTER: if(selected>-1){ obj.value=getSelectedValue(); hideAutoComplete(); } return killEvent(event); break; default: } }  obj.onkeyup=function(event){ switch(wicketKeyCode(getEvent(event))){ case KEY_ENTER: return killEvent(event); case KEY_UP: case KEY_DOWN: case KEY_ESC: case KEY_TAB: case KEY_RIGHT: case KEY_LEFT: break; default: updateChoices(); } return null; }  obj.onkeypress=function(event){ if(wicketKeyCode(getEvent(event))==KEY_ENTER){ return killEvent(event); } } } 
context: 	function initialize(){		var obj=wicketGet(elementId);		obj.onblur=function(event){			hideAutoComplete();		}				obj.onkeydown=function(event){			switch(wicketKeyCode(getEvent(event))){				case KEY_UP:					if(selected>-1)selected--;					if(selected==-1){						hideAutoComplete();					} else {				    	render();				    }				    if(navigator.appVersion.indexOf('AppleWebKit')>0)return killEvent(event);					break;				case KEY_DOWN:					if(selected<elementCount-1){						selected++;					}					if(visible==0){						updateChoices();					} else {												render();						showAutoComplete();							}				    if(navigator.appVersion.indexOf('AppleWebKit')>0)return killEvent(event);					break;														case KEY_ESC:					hideAutoComplete();					return killEvent(event);					break;				case KEY_ENTER:					if(selected>-1){						obj.value=getSelectedValue();						hideAutoComplete();										}					return killEvent(event);					break;									default:			}		}							obj.onkeyup=function(event){			switch(wicketKeyCode(getEvent(event))){				case KEY_ENTER:					return killEvent(event);				case KEY_UP:				case KEY_DOWN:				case KEY_ESC:				case KEY_TAB:				case KEY_RIGHT:				case KEY_LEFT:					break;									default:					updateChoices();								}		}						obj.onkeypress=function(event){			if(wicketKeyCode(getEvent(event))==KEY_ENTER){				return killEvent(event);			}		}			    if(window.addEventListener){	    	window.addEventListener("load",initializeDiv,false);        } else if(window.attachEvent){        	window.attachEvent("onload",initializeDiv);		}	}
meta: 1204	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1204/8520a7b4736acaa08bb53d628a153375df8192d4/wicket-autocomplete.js/clean/wicket-extensions/src/java/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js