I need to update a DataSourceTextField. Basically I do this in my code:
DataSourceTextField partDataSourceField = new DataSourceTextField(
partFieldName, constants.partTitle());
partDataSourceField.setValueMap(partCodesList);
documentsResultDataSource.setFields(partDataSourceField,
titleDataSourceField);
That code, generates a “part” list on the DataSource for me to filter the results.
What I’ve been trying is this dynamically change this list to set it to show only the values that are available on the results. I’ve tried this with no avail:
DataSourceField partField = documentsResultDataSource.getField(partFieldName);
LinkedHashMap<String, String> partCurrentCodesList = new LinkedHashMap<String, String>();
partCurrentCodesList.put("Test", "Test");
partField.setValueMap(partCurrentCodesList);
Is it possible to accomplish what I need?
I deleted the DataSourceTextField and then :
This is sub-optimal but the best solution I found.