- Fehlerkorrekturen für die CustomizableObjectList
- Fehlende Eigenschaften beim ProceedingsPropertyStep nachgetragen (als Basis wurde nicht der Sheet vom PublicationWithPublisherPropertiesStep sondern der vom PublicationPropertiesStep verwendet). git-svn-id: https://svn.libreccm.org/ccm/trunk@813 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
bb1f289953
commit
aa13c461ee
|
|
@ -118,7 +118,8 @@ public class CompareFilter implements Filter {
|
||||||
Element filter;
|
Element filter;
|
||||||
String selected;
|
String selected;
|
||||||
|
|
||||||
filter = new Element("compareFilter");
|
filter = new Element("filter");
|
||||||
|
filter.addAttribute("type", "compare");
|
||||||
|
|
||||||
if ((value == null) || value.isEmpty()) {
|
if ((value == null) || value.isEmpty()) {
|
||||||
if (allOptionIsDefault) {
|
if (allOptionIsDefault) {
|
||||||
|
|
|
||||||
|
|
@ -276,11 +276,6 @@ public class CustomizableObjectList extends ComplexObjectList {
|
||||||
content.addAttribute(attribute.getKey(), attribute.getValue());
|
content.addAttribute(attribute.getKey(), attribute.getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
Element filterElems = content.newChildElement("filters");
|
|
||||||
for (Map.Entry<String, Filter> filterEntry : filters.entrySet()) {
|
|
||||||
filterElems.addContent(filterEntry.getValue().getXml());
|
|
||||||
}
|
|
||||||
|
|
||||||
//Look for values for the filters and the sort fields in the HTTP
|
//Look for values for the filters and the sort fields in the HTTP
|
||||||
//request. We are not using the Bebop parameters for two reasons:
|
//request. We are not using the Bebop parameters for two reasons:
|
||||||
//- They have to be registered very early, so we can't add new parameters
|
//- They have to be registered very early, so we can't add new parameters
|
||||||
|
|
@ -309,7 +304,14 @@ public class CustomizableObjectList extends ComplexObjectList {
|
||||||
sortBy = new ArrayList<String>(sortFields.values()).get(0);
|
sortBy = new ArrayList<String>(sortFields.values()).get(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
Element sortFieldElems = content.newChildElement("sortFields");
|
Element controls = content.newChildElement("controls");
|
||||||
|
|
||||||
|
Element filterElems = controls.newChildElement("filters");
|
||||||
|
for (Map.Entry<String, Filter> filterEntry : filters.entrySet()) {
|
||||||
|
filterElems.addContent(filterEntry.getValue().getXml());
|
||||||
|
}
|
||||||
|
|
||||||
|
Element sortFieldElems = controls.newChildElement("sortFields");
|
||||||
sortFieldElems.addAttribute("sortBy", sortByKey);
|
sortFieldElems.addAttribute("sortBy", sortByKey);
|
||||||
for (Map.Entry<String, String> sortField : sortFields.entrySet()) {
|
for (Map.Entry<String, String> sortField : sortFields.entrySet()) {
|
||||||
Element sortFieldElem = sortFieldElems.newChildElement("sortField");
|
Element sortFieldElem = sortFieldElems.newChildElement("sortField");
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,8 @@ public class SelectFilter implements Filter {
|
||||||
|
|
||||||
options = getOptions();
|
options = getOptions();
|
||||||
|
|
||||||
filter = new Element("selectFilter");
|
filter = new Element("filter");
|
||||||
|
filter.addAttribute("type", "select");
|
||||||
|
|
||||||
if ((value == null) || value.isEmpty()) {
|
if ((value == null) || value.isEmpty()) {
|
||||||
if (allOptionIsDefault) {
|
if (allOptionIsDefault) {
|
||||||
|
|
@ -102,7 +103,7 @@ public class SelectFilter implements Filter {
|
||||||
|
|
||||||
if (allOption) {
|
if (allOption) {
|
||||||
optionElem = filter.newChildElement("option");
|
optionElem = filter.newChildElement("option");
|
||||||
optionElem.addAttribute(label, ALL);
|
optionElem.addAttribute("label", ALL);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (String optionStr : options) {
|
for (String optionStr : options) {
|
||||||
|
|
|
||||||
|
|
@ -41,12 +41,8 @@ public class TextFilter implements Filter {
|
||||||
if ((value == null) || value.isEmpty()) {
|
if ((value == null) || value.isEmpty()) {
|
||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
/*return String.format("(lower(%s) LIKE lower('%%%s%%'))",
|
return String.format("(lower(%s) LIKE lower('%%%s%%'))",
|
||||||
property, value);*/
|
property, value);
|
||||||
|
|
||||||
return String.format("(lower(%s) LIKE lower('%%%s%%')) OR (lower(%s) LIKE lower('%%%s%%'))",
|
|
||||||
property, value,
|
|
||||||
property, firstToUpper(value));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -64,7 +60,8 @@ public class TextFilter implements Filter {
|
||||||
public Element getXml() {
|
public Element getXml() {
|
||||||
Element textFilter;
|
Element textFilter;
|
||||||
|
|
||||||
textFilter = new Element("textFilter");
|
textFilter = new Element("filter");
|
||||||
|
textFilter.addAttribute("type", "text");
|
||||||
|
|
||||||
textFilter.addAttribute("label", label);
|
textFilter.addAttribute("label", label);
|
||||||
if ((value != null) && !value.isEmpty()) {
|
if ((value != null) && !value.isEmpty()) {
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ public class ProceedingsPropertiesStep
|
||||||
|
|
||||||
public static Component getProceedingsPropertySheet(
|
public static Component getProceedingsPropertySheet(
|
||||||
ItemSelectionModel itemModel) {
|
ItemSelectionModel itemModel) {
|
||||||
DomainObjectPropertySheet sheet = (DomainObjectPropertySheet) getPublicationPropertySheet(
|
DomainObjectPropertySheet sheet = (DomainObjectPropertySheet) getPublicationWithPublisherPropertySheet(
|
||||||
itemModel);
|
itemModel);
|
||||||
|
|
||||||
sheet.add(PublicationGlobalizationUtil.globalize(
|
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue