Type ahead shows list


What I would like to do is enter a name in a table cell and for a listener on the cell to get a list of names from the db and display them in a combo box.

I can display a combo box okay which is editable in a table cell but I cannot find a listener which listens to the text being entered.

Is there any solution to this at all?

Thanks in advance for any help.

Through a bit of lateral thinking I have come up with this sort of thing…

tablePeople.setTableFieldFactory(new DefaultFieldFactory() {
		    public Field createField(Container container, Object itemId, Object propertyId, Component uiContext) {
		        if ("Person".equals(propertyId)) {

					final TextField tf = new TextField();
					tf.addListener(new TextChangeListener() {
						public void textChange(TextChangeEvent event) {
							if (layerPeopleChooser == null){
								layerPeopleChooser = new VerticalLayout();
								mainLayout.addComponent(layerPeopleChooser, "top:50px;left:5.0px;");
							final Table t = new Table();

							t.addContainerProperty("Id", Long.class, null);
							t.addContainerProperty("Person", String.class, null);


							String name = event.getText();
							List<GpiPeople> people = gpi_db.findByName(name);
							for (GpiPeople p : people) {
								Long id = p.getPplId();
								String pname = p.getPplSurname() + " " + p.getPplFirstname();
								t.addItem(new Object[] { id, pname }, t.getItemIds().size());

							t.addListener(new ItemClickListener() {

								public void itemClick(ItemClickEvent event) {
									Table table = (Table) event.getSource();
									Item item = table.getItem(event.getItemId());

									Property pId = item.getItemProperty("Id");
									Long id = (Long) pId.getValue();
									Property pName = item.getItemProperty("Person");
									String name = (String) pName.getValue();

									layerPeopleChooser = null;
					return tf;

I thought I would share it.

I am new to Vaadin, I do not know if this sort of thing is good practice but it works for me! B)