model.addAttribute("template", filter.getType().getTemplate(new DataList(), filter.getName(), filter.getLabel()));
return "dbuilder/filterTmplate";
}
protected DataListBinder createDataListBinderFromRequestInternal(AppDefinition appDef, String datalistId, String binderId, HttpServletRequest request) {
DataListBinder binder = null;
if (binderId != null && binderId.trim().length() > 0) {
// create binder
binder = dataListService.getBinder(binderId);
if (request != null) {
// get request params
Enumeration e = request.getParameterNames();
while (e.hasMoreElements()) {
String paramName = (String) e.nextElement();
if (paramName.startsWith(PREFIX_BINDER_PROPERTY)) {
String[] paramValue = (String[]) request.getParameterValues(paramName);
String propName = paramName.substring(PREFIX_BINDER_PROPERTY.length());
String value = CsvUtil.getDeliminatedString(paramValue);
if (value.contains(SecurityUtil.ENVELOPE) || value.contains(PropertyUtil.PASSWORD_PROTECTED_VALUE)) {
DatalistDefinition datalist = datalistDefinitionDao.loadById(datalistId, appDef);
if (datalist != null) {
value = PropertyUtil.propertiesJsonStoreProcessing(datalist.getJson(), value);
}
}
binder.setProperty(propName, AppUtil.processHashVariable(value, null, null, null));
}
}
}
}
return binder;