I have designed a lwuit form with a textfield and a list bottom of it. Now, I want following functionality:
every time user changes a textfield content, list should be refreshed (like autocomlplete feature) but I don't know how to refresh a list? for creating a list I have used following code:
choicelists = createList(urbanplacechoiceGroup, List.VERTICAL, new PlaceRenderer());
and for listening to texhfield changes:
Urbanareas_textpublic.addDataChangeListener(new DataChangedListener() {
public void dataChanged(int type, int index) {
System.out.println("text content: " + Urbanareas_textpublic.getText());
populateurbanplacechoiceGroup();
}
});
urbanplacechoiceGroup is used to populate urbanplacechoiceGroup which its content used for choicelists.
I found this function and it does updating a list:
choicelists.setRenderer(new PlaceRenderer());
is it a standard way to updating list? what happened to PlaceRenderer objects which was created before? thanks.