-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi
I am using the MVVM pattern and I try to use a ComboBox that is capable of suggesting matching entries based on a DB query. So eg. if the user enters "a" the combobox should fetch data from the DB ("SELECT .... WHERE name like 'a%'") and display them.
I tried to use the onChanging event to get informed whenever a user types something. I was able to retrieve the ComboBox value by using
@BindingParam("v") String value, @ContextParam(ContextType.TRIGGER_EVENT) InputEvent event
in the related method with the @Command annotation. The problem is, the behavior of the ComboBox then is kind of weird due to the NotifyChange command that is needed to inform the MVVM about the changed list.
Is there a standard way to achieve this or maybe ComboBox is the wrong input type?
Thanks in advance!
Asked: 2013-11-11 16:25:46 +0800
Seen: 32 times
Last updated: Nov 11 '13
A few questions, Underlining technology is JPA? Or better explained, Do you create real objects after the sql query or is the result from sql directly into the combobox? Then do you use a model or not?
chillworld ( 2013-11-12 11:02:28 +0800 )edit