I file a jira issue here : https://issues.apache.org/jira/browse/WICKET-2005 (with a example that's show the problem)
Gerolf Seitz wrote: > > hi, > in case you haven't done it, can you please file a jira issue with an > attached > example quickstart project that leads to the error? i will take a look at > it > later > today. > > thanks, > gerolf > > On Sun, Jan 4, 2009 at 6:15 PM, Olivier Dutrieux > <[email protected]>wrote: > >> >> I would like create a component that extends AjaxEditableLabel with >> replace >> TextField with AjaxEditableAutoComplete. >> >> >> And I discovert a problem in the wicket-autocomplete.js when the event >> onchange is rewriting (line 83) : >> >> // WICKET-1280 >> objonchangeoriginal=obj.onchange; >> obj.onchange=function(event){ >> if(mouseactive==1)return false; >> if(typeof >> objonchangeoriginal=="function")objonchangeoriginal(); >> } >> objonchange=obj.onchange; >> >> >> >> the problem is that the objonchangeoriginal function can't access to the >> this object, and it's necessary because I change the onchange event on >> AjaxEditableAutoComplete in case I extends AjaxEditableLabel with this : >> >> >> editor.add(new EditorAjaxBehavior() { >> private static final long serialVersionUID = 1L; >> @Override >> protected void onComponentTag(ComponentTag tag) { >> super.onComponentTag(tag); >> final String saveCall = "{wicketAjaxGet('" >> + >> getCallbackUrl() + >> "&save=true&'+this.name+'='+wicketEncode(this.value)); return true;}"; >> tag.put("onchange", saveCall); >> } >> }); >> >> >> then the best way to solve the problem is to change the invocation of >> objonchangeoriginal function with that : >> >> >> 84// WICKET-1280 >> 85 objonchangeoriginal=obj.onchange; >> 86 obj.onchange=function(event){ >> 87 if(mouseactive==1)return false; >> 88 if(typeof >> objonchangeoriginal=="function")objonchangeoriginal.apply(this, [event]); >> 89 } >> 90 objonchange=obj.onchange; >> >> >> all invocation of function need to be change this with new invocation on >> the >> wicket-autocomplete.js file. >> >> -- >> View this message in context: >> http://www.nabble.com/pb-to-access-to-this-on-event-onchange-on-the-AutoCompleteTextField-tp21278638p21278638.html >> Sent from the Wicket - User mailing list archive at Nabble.com. >> > > ----- Duto -- View this message in context: http://www.nabble.com/pb-to-access-to-this-on-event-onchange-on-the-AutoCompleteTextField-tp21278638p21298647.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
