AutoCompleteTextField Problem Submitting
Hello, I have an AutoCompleteTextField which works just fine. But when I select any of the given values from the list the validator tells me : xxx is not a valid value... perhaps you have any idea what I can do. Code: private AutoCompleteTextFieldSubject subject = new AutoCompleteTextFieldSubject(subject, new ModelSubject(event.getSubject()), autoCompleteRenderer) { /** * generated UID. */ private static final long serialVersionUID = -928631288762101540L; @Override protected IteratorSubject getChoices(String term) { ListSubject ret = new LinkedListSubject(); ListSubject subjects = controller.getAllSubjects(); for (Subject subject : subjects) { if (subject.getName().startsWith(term)) { ret.add(subject); } } return ret.iterator(); } }; Thanks, Sebastian
Re: AutoCompleteTextField Problem Submitting
I had the same problem, its something related to converters or how your text value is converted to ( in your case ) Subject - and as there is no converter for that - it is just failing. What I've done is set the model to null and added a method getChoice which does the conversion. This is not very convenient way but it works. Maybe Igor would have any suggestions how to solve this in a better way? Žilvinas Vilutis Mobile: (+370) 652 38353 E-mail: cika...@gmail.com On Wed, May 12, 2010 at 7:22 AM, Sebastian Gabriel sebastian.gabr...@hs-augsburg.de wrote: Hello, I have an AutoCompleteTextField which works just fine. But when I select any of the given values from the list the validator tells me : xxx is not a valid value... perhaps you have any idea what I can do. Code: private AutoCompleteTextFieldSubject subject = new AutoCompleteTextFieldSubject(subject, new ModelSubject(event.getSubject()), autoCompleteRenderer) { /** * generated UID. */ private static final long serialVersionUID = -928631288762101540L; @Override protected IteratorSubject getChoices(String term) { ListSubject ret = new LinkedListSubject(); ListSubject subjects = controller.getAllSubjects(); for (Subject subject : subjects) { if (subject.getName().startsWith(term)) { ret.add(subject); } } return ret.iterator(); } }; Thanks, Sebastian
Re: AutoCompleteTextField Problem Submitting
Thanks for your fast answer. I have a question about your solution. You say setting the model to null and adding a getChoice method would solve the problem. This means that I set the AutoCompleteTextField type to String and the String in the AutoCompleteTextField has to be unique in order to identify the right object, hasn't it? Thanks Sebastian Am 12.05.2010 um 19:26 schrieb Zilvinas Vilutis: I had the same problem, its something related to converters or how your text value is converted to ( in your case ) Subject - and as there is no converter for that - it is just failing. What I've done is set the model to null and added a method getChoice which does the conversion. This is not very convenient way but it works. Maybe Igor would have any suggestions how to solve this in a better way? Žilvinas Vilutis Mobile: (+370) 652 38353 E-mail: cika...@gmail.com On Wed, May 12, 2010 at 7:22 AM, Sebastian Gabriel sebastian.gabr...@hs-augsburg.de wrote: Hello, I have an AutoCompleteTextField which works just fine. But when I select any of the given values from the list the validator tells me : xxx is not a valid value... perhaps you have any idea what I can do. Code: private AutoCompleteTextFieldSubject subject = new AutoCompleteTextFieldSubject(subject, new ModelSubject(event.getSubject()), autoCompleteRenderer) { /** * generated UID. */ private static final long serialVersionUID = -928631288762101540L; @Override protected IteratorSubject getChoices(String term) { ListSubject ret = new LinkedListSubject(); ListSubject subjects = controller.getAllSubjects(); for (Subject subject : subjects) { if (subject.getName().startsWith(term)) { ret.add(subject); } } return ret.iterator(); } }; Thanks, Sebastian - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AutoCompleteTextField Problem Submitting
Wait, I lied a little :) I use new ModelType( null ), so no value is being set to model object. Actually I've ported the impl of AbstractAutoCompleteTextField as described in https://cwiki.apache.org/WICKET/autocomplete-using-a-wicket-model.html so and use the findChoice method for selected value resolution. Žilvinas Vilutis Mobile: (+370) 652 38353 E-mail: cika...@gmail.com On Wed, May 12, 2010 at 11:32 AM, Sebastian Gabriel sebastian.gabr...@hs-augsburg.de wrote: Thanks for your fast answer. I have a question about your solution. You say setting the model to null and adding a getChoice method would solve the problem. This means that I set the AutoCompleteTextField type to String and the String in the AutoCompleteTextField has to be unique in order to identify the right object, hasn't it? Thanks Sebastian Am 12.05.2010 um 19:26 schrieb Zilvinas Vilutis: I had the same problem, its something related to converters or how your text value is converted to ( in your case ) Subject - and as there is no converter for that - it is just failing. What I've done is set the model to null and added a method getChoice which does the conversion. This is not very convenient way but it works. Maybe Igor would have any suggestions how to solve this in a better way? Žilvinas Vilutis Mobile: (+370) 652 38353 E-mail: cika...@gmail.com On Wed, May 12, 2010 at 7:22 AM, Sebastian Gabriel sebastian.gabr...@hs-augsburg.de wrote: Hello, I have an AutoCompleteTextField which works just fine. But when I select any of the given values from the list the validator tells me : xxx is not a valid value... perhaps you have any idea what I can do. Code: private AutoCompleteTextFieldSubject subject = new AutoCompleteTextFieldSubject(subject, new ModelSubject(event.getSubject()), autoCompleteRenderer) { /** * generated UID. */ private static final long serialVersionUID = -928631288762101540L; @Override protected IteratorSubject getChoices(String term) { ListSubject ret = new LinkedListSubject(); ListSubject subjects = controller.getAllSubjects(); for (Subject subject : subjects) { if (subject.getName().startsWith(term)) { ret.add(subject); } } return ret.iterator(); } }; Thanks, Sebastian
AutoCompleteTextField problem
Hi, I have AutoCompleteTextField with AjaxFormComponentUpdatingBehavior(onchange). When the value is chosen from the auto complete it populates the model object of a drop down. Both of the components are in a form. The problem is it is working only the first time. Then IE reports Error on Page: Object required. I've tried to debug the error in FireFox but when I'm using Firefox it works fine with no error. If I use DropDownChoice instead of AutoCompleteTextField it works with no errors as well. I'm using wicket-1.2.6 and wicket-extensions-1.2.6. Has anybody seen something like this? Is it a bug in 1.2.6 AutoCompleteTextField for IE? Unfortunately I almost all of the clients are using IE and it has to work with this browser. Here is the code snippet: acTextField.add(new AjaxFormComponentUpdatingBehavior(onchange){ private static final long serialVersionUID = 1L; @Override public void onUpdate(AjaxRequestTarget target){ String name = acTextField.getModelObjectAsString(); dropDown.setModelObject(name); target.addComponent(form); } }); dropDown and acTextField are added to the form. -- View this message in context: http://www.nabble.com/AutoCompleteTextField-problem-tf4949236.html#a14170390 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: AutoCompleteTextField problem
Onblur is not the thing I want but I've tried it and it doesn't work. -Original Message- From: Dipu Seminlal [mailto:[EMAIL PROTECTED] Sent: 05 December 2007 12:10 To: users@wicket.apache.org Subject: Re: AutoCompleteTextField problem can you try changing the event from onchange to onblur On Dec 5, 2007 12:08 PM, dariusz.holda [EMAIL PROTECTED] wrote: Hi, I have AutoCompleteTextField with AjaxFormComponentUpdatingBehavior(onchange). When the value is chosen from the auto complete it populates the model object of a drop down. Both of the components are in a form. The problem is it is working only the first time. Then IE reports Error on Page: Object required. I've tried to debug the error in FireFox but when I'm using Firefox it works fine with no error. If I use DropDownChoice instead of AutoCompleteTextField it works with no errors as well. I'm using wicket-1.2.6 and wicket-extensions-1.2.6. Has anybody seen something like this? Is it a bug in 1.2.6 AutoCompleteTextField for IE? Unfortunately I almost all of the clients are using IE and it has to work with this browser. Here is the code snippet: acTextField.add(new AjaxFormComponentUpdatingBehavior(onchange){ private static final long serialVersionUID = 1L; @Override public void onUpdate(AjaxRequestTarget target){ String name = acTextField.getModelObjectAsString(); dropDown.setModelObject(name); target.addComponent(form); } }); dropDown and acTextField are added to the form. -- View this message in context: http://www.nabble.com/AutoCompleteTextField-problem-tf4949236.html#a1417 0390 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: AutoCompleteTextField problem
Yes it did work. And if I want to refresh the form? Do I have to enclose all the form components in the web markup? Dariusz -Original Message- From: Dipu Seminlal [mailto:[EMAIL PROTECTED] Sent: 05 December 2007 14:28 To: users@wicket.apache.org Subject: Re: AutoCompleteTextField problem can you please try enclosing the dropdown in a webmarkupcontainer and repaint the container instead of repainting the whole form. That will work. regards dipu On Dec 5, 2007 2:23 PM, Dipu Seminlal [EMAIL PROTECTED] wrote: agreed, onBlur doesn't seem to work, in my project had added onChange and OnBlur to be on the safer side, but now noticed that onBlur is not getting fired On Dec 5, 2007 12:20 PM, Holda, Dariusz [EMAIL PROTECTED] wrote: Onblur is not the thing I want but I've tried it and it doesn't work. -Original Message- From: Dipu Seminlal [mailto:[EMAIL PROTECTED] Sent: 05 December 2007 12:10 To: users@wicket.apache.org Subject: Re: AutoCompleteTextField problem can you try changing the event from onchange to onblur On Dec 5, 2007 12:08 PM, dariusz.holda [EMAIL PROTECTED] wrote: Hi, I have AutoCompleteTextField with AjaxFormComponentUpdatingBehavior(onchange). When the value is chosen from the auto complete it populates the model object of a drop down. Both of the components are in a form. The problem is it is working only the first time. Then IE reports Error on Page: Object required. I've tried to debug the error in FireFox but when I'm using Firefox it works fine with no error. If I use DropDownChoice instead of AutoCompleteTextField it works with no errors as well. I'm using wicket-1.2.6 and wicket-extensions-1.2.6. Has anybody seen something like this? Is it a bug in 1.2.6 AutoCompleteTextField for IE? Unfortunately I almost all of the clients are using IE and it has to work with this browser. Here is the code snippet: acTextField.add(new AjaxFormComponentUpdatingBehavior(onchange){ private static final long serialVersionUID = 1L; @Override public void onUpdate(AjaxRequestTarget target){ String name = acTextField.getModelObjectAsString(); dropDown.setModelObject(name); target.addComponent(form); } }); dropDown and acTextField are added to the form. -- View this message in context: http://www.nabble.com/AutoCompleteTextField-problem-tf4949236.html#a1417 0390 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice
Re: AutoCompleteTextField problem
can you please try enclosing the dropdown in a webmarkupcontainer and repaint the container instead of repainting the whole form. That will work. regards dipu On Dec 5, 2007 2:23 PM, Dipu Seminlal [EMAIL PROTECTED] wrote: agreed, onBlur doesn't seem to work, in my project had added onChange and OnBlur to be on the safer side, but now noticed that onBlur is not getting fired On Dec 5, 2007 12:20 PM, Holda, Dariusz [EMAIL PROTECTED] wrote: Onblur is not the thing I want but I've tried it and it doesn't work. -Original Message- From: Dipu Seminlal [mailto:[EMAIL PROTECTED] Sent: 05 December 2007 12:10 To: users@wicket.apache.org Subject: Re: AutoCompleteTextField problem can you try changing the event from onchange to onblur On Dec 5, 2007 12:08 PM, dariusz.holda [EMAIL PROTECTED] wrote: Hi, I have AutoCompleteTextField with AjaxFormComponentUpdatingBehavior(onchange). When the value is chosen from the auto complete it populates the model object of a drop down. Both of the components are in a form. The problem is it is working only the first time. Then IE reports Error on Page: Object required. I've tried to debug the error in FireFox but when I'm using Firefox it works fine with no error. If I use DropDownChoice instead of AutoCompleteTextField it works with no errors as well. I'm using wicket-1.2.6 and wicket-extensions-1.2.6. Has anybody seen something like this? Is it a bug in 1.2.6 AutoCompleteTextField for IE? Unfortunately I almost all of the clients are using IE and it has to work with this browser. Here is the code snippet: acTextField.add(new AjaxFormComponentUpdatingBehavior(onchange){ private static final long serialVersionUID = 1L; @Override public void onUpdate(AjaxRequestTarget target){ String name = acTextField.getModelObjectAsString(); dropDown.setModelObject(name); target.addComponent(form); } }); dropDown and acTextField are added to the form. -- View this message in context: http://www.nabble.com/AutoCompleteTextField-problem-tf4949236.html#a1417 0390 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This message is intended only for the personal and confidential use of the designated recipient(s) named above. If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited. This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such. All information is subject to change without notice. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]