Hi, This was a big help for me in getting what I wanted to do. It works really good except for one problem. When the form shows up with a non null empty object, the autocomplete field has the class name for the object in it, i.e., "com.michni.search.bean.urll...@c1853". Once I load an object in the form works fine.
Here is my code: form = new Form<GUIBeanInventoryItem>( "form", new CompoundPropertyModel<GUIBeanInventoryItem>( new GUIBeanInventoryItem())); IAutoCompleteRenderer<UrlLink> urlLinkRenderer = new AbstractAutoCompleteTextRenderer<UrlLink>() { private static final long serialVersionUID = 1L; @Override protected String getTextValue(UrlLink urlLink) { return urlLink.getUrl(); } }; autoCompleteUrl = new AutoCompleteTextField<UrlLink>( "urlLink", new CompoundPropertyModel<UrlLink>(new UrlLink()), urlLinkRenderer) { private static final long serialVersionUID = -5590853972046975757L; @Override protected Iterator<UrlLink> getChoices( String valueLike) { try { List<UrlLink> urlLink = dao........... return urlLink.iterator(); } catch (Exception e) { throw new RuntimeException(e); } } }; form.add(autoCompleteUrl); In the code I have made sure that the UrlLink in GUIBeanInventoryItem is not null and that urlLink.getUrl() returns "". I have solved this problem with other items before but for some reason can't seem to solve it now. Appreciate any help. Thanks. -- View this message in context: http://old.nabble.com/AutoCompleteTextField%3CT%3E-in-1.4-SNAPSHOT-tp17365392p26355482.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org