Autofill in vaadin?

I am new to vaadin. How to make autocomplete (actually, rather, as suggested by Google) on a huge set of data that cannot be loaded into memory, but instead execute a JPA request for each key event. Can I record key events in a text box or combo box?

Greetings

+3
source share
5 answers

You can check out Henrik Paul's SuperImmediateTextField , which is a Vaadin add-on that allows you to set a client-server delay in seconds. From this, it has a common Java stack on it, so that the stream is as smooth as possible. Caching, JPA requests or something else. A pair of the second delay will at least slightly reduce the load on the server.

+3
source

You can find the link. I assume this is fixed in 6.5. There is also addon if you want to check.

you need to consider this though

field value -> json -> vaadin servlet -> service (spring / ejb / pojo or something else) -> JPA -> query -> list of results (which can be huge initially)

...

. , 1- , .

0

, Vaadin ComboBox, . :

  • com.vaadin.ui.ComboBox ComboBox # buildFilter() .
  • com.vaadin.data.Container.Filter : .
  • com.vaadin.data.Container, .

, .

0

Source: https://habr.com/ru/post/1777559/


All Articles