Hi!

I tried to implement AutoCompleteTextField in my project but failed when
started to use jquery lib with this Component. 

Markup of AutoCompletePage.html is:
/<?xml version="1.0" encoding="UTF-8" ?>
<html xmlns:wicket="http://wicket.apache.org";>
<body>
<input type="text" wicket:id="ac" size="50" />
</body>
</html>/

Code of AutoCompletePage.java is:
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

/import
org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteTextField;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.model.Model;

public class AutoCompletePage extends WebPage {
        @Override
        protected void onBeforeRender() {
                final AutoCompleteTextField<String> field = new
AutoCompleteTextField<String>("ac", new Model<String>("")) {
                        @Override
                        protected Iterator<String> getChoices(String input) {
                                List<String> choices = new ArrayList<String>();
                                choices.add("Foo");
                                choices.add("Bar");
                                choices.add("Baz");
                                return choices.iterator();
                        }
                };
                add(field);

                super.onBeforeRender();
        }
}/

This code work perfectly and getChoices method successfully called when
input is chages, but if I add to markup jquery library:
/<head>
        
</head>/
getChoices method don't called 
I tried to use other versions of jquery (1.7.3, 2.0.3), but this led to the
same result. I'm use Wicket 6.6.0.
Can anyone help me? Thanks!



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AutoCompleteTextField-s-getChoices-method-not-called-with-jquery-tp4660716.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to