combobox autocomplete not working?

im trying to use a combobox to display serial numbers of items to the user to select. its important of cause that autocomplete works - so that when the user startes to type a number it will suggest item in stock that match the number as soon as possible but also force the user to select a number thats actually real and in stock

        FreeformQuery query = new FreeformQuery("select * from lager where patientid = -1 order by serieno", SQLHandler.getInstance().getPool());
        SQLContainer container = new SQLContainer(query);

its showing the strings OK, but autocomplete does not work. When the user starts to type it just shows the dropdown it does not scroll to the numbers in the list that match.

why is that - what am I missing?

Hi Jan,
I think the problem is that FreeformQuery does not support filtering out of the box; you should provide a FreeformQueryDelegate implementation.

for more info.


yes, was suprised to see the amount of things needed to get a simple combobox working. I understand why this is needed for a complex table where there are a lot of options for sorting and filtering, but the combobox here is just a list of strings. I would have expected the CB to see this and say ok, this I can actually handle.

anyway, of cause there are a lot more complex uses than mine that would probably explain the complex code needed.

I simply changed it to a loop of a resultset. Took 10 sec. to implement this way :slight_smile: