Re: [Wicket-user] I cannot add ajax behavior to an AutoCompleteTextField
I think you have to use AjaxCallDecorators. Eelco On 4/26/07, Andrés Ferrari [EMAIL PROTECTED] wrote: Hi everyone! I'm having trouble with an AutoCompleteTextField. I want to add an ajax behavior to it (specifically, for onblur) like can I do with other wicket components, but somehow it doesn't work. I can add an AjaxFormComponentUpdatingBehavior to a TextField and it works. I cannot add it to an AutoCompleteTextField. The Ajax debug console shows no errors. It seems that the autocomplete has its own hardcoded behavior which cannot be overridden, if I understood the code correctly. Is there any way of adding other behaviors, specifically onblur? I'm using Wicket 1.2.4. Thanks! --Andrés - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] I cannot add ajax behavior to an AutoCompleteTextField
Thanks Eelco, it was caused by a bug in Wicket 1.2.4. It works for me in Wicket 1.2.6 --Andrés Eelco Hillenius wrote: I think you have to use AjaxCallDecorators. Eelco On 4/26/07, Andrés Ferrari [EMAIL PROTECTED] wrote: Hi everyone! I'm having trouble with an AutoCompleteTextField. I want to add an ajax behavior to it (specifically, for onblur) like can I do with other wicket components, but somehow it doesn't work. I can add an AjaxFormComponentUpdatingBehavior to a TextField and it works. I cannot add it to an AutoCompleteTextField. The Ajax debug console shows no errors. It seems that the autocomplete has its own hardcoded behavior which cannot be overridden, if I understood the code correctly. Is there any way of adding other behaviors, specifically onblur? I'm using Wicket 1.2.4. Thanks! --Andrés - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] I cannot add Ajax behavior to an AutoCompleteTextField
test this patch, and see if it works. looks like autocomplete takes over onblur when it attaches to the textfield, this should help. it is untested because im a bit short on time, so you will have to do the confirmation. -igor Index: D:/source/wicket/trunk/jdk-1.4 /wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket- autocomplete.js === --- D:/source/wicket/trunk/jdk-1.4 /wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket- autocomplete.js(revision 531257) +++ D:/source/wicket/trunk/jdk-1.4 /wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket- autocomplete.js(working copy) @@ -61,6 +61,7 @@ obj.onblur=function(event){ if(mouseactive==1)return false; hideAutoComplete(); + objonblur(); } obj.onkeydown=function(event){ On 4/27/07, Andrés Ferrari [EMAIL PROTECTED] wrote: (Sorry the following mail is duplicated... I sent the original to the wrong thread) --- Hi everyone! I'm having trouble with an AutoCompleteTextField. I want to add an ajax behavior to it (specifically, for onblur) like can I do with other wicket components, but somehow it doesn't work. I can add an AjaxFormComponentUpdatingBehavior to a TextField and it works. I cannot add it to an AutoCompleteTextField. The Ajax debug console shows no errors. It seems that the autocomplete has its own hardcoded behavior which cannot be overridden, if I understood the code correctly. Is there any way of adding other behaviors, specifically onblur? I'm using Wicket 1.2.4. Thanks! --Andrés - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] I cannot add Ajax behavior to an AutoCompleteTextField
Thanks Igor! Inspecting your patch I realized the bug is fixed for Wicket 1.2.6, so upgrading solved my problem :-) (but indeed, your solution was right). Thanks again. --Andrés Igor Vaynberg wrote: test this patch, and see if it works. looks like autocomplete takes over onblur when it attaches to the textfield, this should help. it is untested because im a bit short on time, so you will have to do the confirmation. -igor Index: D:/source/wicket/trunk/jdk-1.4 /wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/h tml/autocomplete/wicket- autocomplete.js === --- D:/source/wicket/trunk/jdk-1.4 /wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/h tml/autocomplete/wicket- autocomplete.js(revision 531257) +++ D:/source/wicket/trunk/jdk-1.4 /wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/h tml/autocomplete/wicket- autocomplete.js(working copy) @@ -61,6 +61,7 @@ obj.onblur=function(event){ if(mouseactive==1)return false; hideAutoComplete(); + objonblur(); } obj.onkeydown=function(event){ On 4/27/07, Andrés Ferrari [EMAIL PROTECTED] wrote: (Sorry the following mail is duplicated... I sent the original to the wrong thread) --- Hi everyone! I'm having trouble with an AutoCompleteTextField. I want to add an ajax behavior to it (specifically, for onblur) like can I do with other wicket components, but somehow it doesn't work. I can add an AjaxFormComponentUpdatingBehavior to a TextField and it works. I cannot add it to an AutoCompleteTextField. The Ajax debug console shows no errors. It seems that the autocomplete has its own hardcoded behavior which cannot be overridden, if I understood the code correctly. Is there any way of adding other behaviors, specifically onblur? I'm using Wicket 1.2.4. Thanks! --Andrés - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user