Display more columns in NativSelect

Hi guys,

if I have a NativSelect which fetch a SQLContainer with following code:


		place = new NativeSelect("Ort");
		place.setNullSelectionAllowed(false);
		place.setImmediate(true);
		place.setItemCaptionPropertyId("ort");
		place.setContainerDataSource(app.getDatabaseManager().getAdresseContainer());

He display everything from column called “ort”. But i want to display more columns because there are rows with the same placename. i want to display Street, Housenumber, Ort

Do you know how to do this?

Since a select cannot contain multiple columns, you will have to make your container implementation generate a new property (with id “caption”, for example) that combines all of the required information into a single String.

An alternative is to call the setItemCaption(Object itemId, String caption) on your select for each and every itemId in the container. This way you don’t need to add any new property to the container.

HTH,
/Jonatan