- Beim Kategorienfilter kann jetzt bestimmt werden, ob es möglich ist, mehrere Möglichkeiten auszuwählen (setMultiple).
- Formatierungen usw. in PublicPersonalProfileNavigationTable.java git-svn-id: https://svn.libreccm.org/ccm/trunk@2339 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
c3c8c22446
commit
f1d71671ae
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2011 Jens Pelzetter
|
* Copyright (c) 2011, 2013 Jens Pelzetter
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public License
|
* modify it under the terms of the GNU Lesser General Public License
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ public class CategoryFilter {
|
||||||
|
|
||||||
private final String label;
|
private final String label;
|
||||||
private String separator = " ";
|
private String separator = " ";
|
||||||
|
private boolean multiple = true;
|
||||||
private final Category filterRootCat;
|
private final Category filterRootCat;
|
||||||
private final List<String> values = new ArrayList<String>();
|
private final List<String> values = new ArrayList<String>();
|
||||||
private final Map<String, String> catNameToCatId = new HashMap<String, String>();
|
private final Map<String, String> catNameToCatId = new HashMap<String, String>();
|
||||||
|
|
@ -101,6 +102,12 @@ public class CategoryFilter {
|
||||||
filter.newChildElement("searchString").setText(searchString.toString());
|
filter.newChildElement("searchString").setText(searchString.toString());
|
||||||
filter.newChildElement("categoriesStr").setText(categoriesStr.toString());
|
filter.newChildElement("categoriesStr").setText(categoriesStr.toString());
|
||||||
filter.newChildElement("separator").setText(separator);
|
filter.newChildElement("separator").setText(separator);
|
||||||
|
final Element multipleElem = filter.newChildElement("multiple");
|
||||||
|
if (multiple) {
|
||||||
|
multipleElem.setText("true");
|
||||||
|
} else {
|
||||||
|
multipleElem.setText("false");
|
||||||
|
}
|
||||||
|
|
||||||
for (String value : values) {
|
for (String value : values) {
|
||||||
if (!catNameToCatId.containsKey(value)) {
|
if (!catNameToCatId.containsKey(value)) {
|
||||||
|
|
@ -145,6 +152,14 @@ public class CategoryFilter {
|
||||||
public void setSeparator(final String separator) {
|
public void setSeparator(final String separator) {
|
||||||
this.separator = separator;
|
this.separator = separator;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isMultiple() {
|
||||||
|
return multiple;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMultiple(final boolean multiple) {
|
||||||
|
this.multiple = multiple;
|
||||||
|
}
|
||||||
|
|
||||||
public void setValue(final String value) {
|
public void setValue(final String value) {
|
||||||
if ((value != null) && !value.isEmpty()) {
|
if ((value != null) && !value.isEmpty()) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue