I have a demo of this working at http://braid.com.au/wicket/wicket-grid-autocomplete.htm
I'm preparing a wicket-contrib-ajax-sandbox-examples project at the moment. Cameron > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:wicket-develop- > [EMAIL PROTECTED] On Behalf Of Cameron Braid > Sent: Wednesday, 24 August 2005 11:50 PM > To: [email protected] > Subject: RE: [Wicket-develop] new autocomplete text field added to wicket- > stuff > > Good work Ryan. > > I have also committed an autocomplete text field implementation to > wicket-wtiff/wicket-contrib-ajax-sandbox > > I see that we have both used the same scriptaculous javascript library. > > We should work together to create a killer autocomplete component for > wicket. > > > My implementation is the wicket.contrib.ajax.sandbox.autocomplete. > AutoCompleteTextFieldBorder class (you can ignore my AutoCompleteTextField > implementation - as it is incomplete and currently can't work) > > I use a bookmarkable page to generate the list items since this allows for > complete flexability of the content of the drop down list. > > I would like to use the IEventRequestHandler to render the list items - > however to do this properly wicket needs to support an api for rendering a > single component (and its children) > > Then, the AutoCompleteTextField constructor can take any component > instance > to provide the html for the IEventRequestHandler.onEventRequest() > callback. > > My auto complete text field is implemented using a subclass of Border to > allow for the input component to be layed out in a table, with an > indicator > image to show when there is client-server communication. > > One unfortunate drawback of using a Border is that the HTML needs to look > like this : <span wicket:id='blah'><input type='text' > wicket:id='blah'/></span> > > A solution for this could be to add special support into wicket core - > something in between using a border and using markup inheritance. > > This new idea would be to allow subclassing of a component, however using > a > pre and post markup stream, and also adding components to its parend. > > Something like this : > > class AutoCompleteTextField extends TextField implements INewInterface { > > public AutoCompleteTextField(String id, IModel model) { > super(id, model); > } > > // member of INewInterface > public void addComponentsToParent(Component parent) { > parent.add(new Image("indicator")) > } > > } > > AutoCompleteTextField.html > > <table> > <tr> > <td> > <!-- the subclass is rendered here --> > <wicket:body/> > </td> > <td> > <img wicket:id='indicator'/> > </td> > </tr> > </table> > > I'm glad to see that someone else is interested in working on wicket + > ajax. > > I'm keen to hear everyone's thoughts. > > Cameron. > > > -----Original Message----- > > From: [EMAIL PROTECTED] [mailto:wicket-develop- > > [EMAIL PROTECTED] On Behalf Of Ryan Sonnek > > Sent: Wednesday, 24 August 2005 12:38 AM > > To: [email protected] > > Subject: [Wicket-develop] new autocomplete text field added to wicket- > > stuff > > > > Hey wicket developers, > > I just committed a new autocomplete text field component to wicket-stuff > > that uses the Wicket AJAX support. It's built on top of prototype and > > mirrors the functionality of the scritaculous demos. I've also added > > example pages to wicket stuff to show off and excersize the API. I > > would really appreciate if anyone out there could take a look at the > > code and give any possible suggestions for improvement. Any > > wicket-stuff committers can feel free to tear into the code an make > > improments as they see fit. > > > > I have also published a snapshot version of the component for anyone > > that wants to try it out. More info is on my blog: > > http://jroller.com/page/wireframe/?anchor=ajax_added_to_wicket_stuff > > > > Thanks, > > Ryan Sonnek > > > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle > Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > _______________________________________________ > Wicket-develop mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/wicket-develop ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ Wicket-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-develop
