private void generateOptions(ReportGeneratorActionForm form, ReportEngine engine, String siteId) throws NumberFormatException, Exception {
Collection<?> collection = engine.getReportParameters();
Iterator<?> iterator = collection.iterator();
while (iterator.hasNext()) {
IParameterDefnBase definition = (IParameterDefnBase) iterator.next();
ScalarParameterHandle handle = (ScalarParameterHandle) definition.getHandle();
if (definition.getName().equals("siteId")) {
continue;
}
if (handle.getControlType().equals(DesignChoiceConstants.PARAM_CONTROL_LIST_BOX)) {
LabelValueBean values[] = engine.getReportParameterOptions(definition);
ReportParamDisplayForm reportParamDisplayForm = null;
for (ReportParamDisplayForm f : form.getReportParameters()) {
if (f.getName().equals(definition.getName())) {
reportParamDisplayForm = f;
break;
}
}
reportParamDisplayForm.setValues(values);