- 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;
|
||||
String selected;
|
||||
|
||||
filter = new Element("compareFilter");
|
||||
filter = new Element("filter");
|
||||
filter.addAttribute("type", "compare");
|
||||
|
||||
if ((value == null) || value.isEmpty()) {
|
||||
if (allOptionIsDefault) {
|
||||
|
|
|
|||
|
|
@ -276,11 +276,6 @@ public class CustomizableObjectList extends ComplexObjectList {
|
|||
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
|
||||
//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
|
||||
|
|
@ -309,7 +304,14 @@ public class CustomizableObjectList extends ComplexObjectList {
|
|||
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);
|
||||
for (Map.Entry<String, String> sortField : sortFields.entrySet()) {
|
||||
Element sortFieldElem = sortFieldElems.newChildElement("sortField");
|
||||
|
|
|
|||
|
|
@ -85,7 +85,8 @@ public class SelectFilter implements Filter {
|
|||
|
||||
options = getOptions();
|
||||
|
||||
filter = new Element("selectFilter");
|
||||
filter = new Element("filter");
|
||||
filter.addAttribute("type", "select");
|
||||
|
||||
if ((value == null) || value.isEmpty()) {
|
||||
if (allOptionIsDefault) {
|
||||
|
|
@ -102,7 +103,7 @@ public class SelectFilter implements Filter {
|
|||
|
||||
if (allOption) {
|
||||
optionElem = filter.newChildElement("option");
|
||||
optionElem.addAttribute(label, ALL);
|
||||
optionElem.addAttribute("label", ALL);
|
||||
}
|
||||
|
||||
for (String optionStr : options) {
|
||||
|
|
|
|||
|
|
@ -41,12 +41,8 @@ public class TextFilter implements Filter {
|
|||
if ((value == null) || value.isEmpty()) {
|
||||
return null;
|
||||
} else {
|
||||
/*return String.format("(lower(%s) LIKE lower('%%%s%%'))",
|
||||
property, value);*/
|
||||
|
||||
return String.format("(lower(%s) LIKE lower('%%%s%%')) OR (lower(%s) LIKE lower('%%%s%%'))",
|
||||
property, value,
|
||||
property, firstToUpper(value));
|
||||
return String.format("(lower(%s) LIKE lower('%%%s%%'))",
|
||||
property, value);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -64,7 +60,8 @@ public class TextFilter implements Filter {
|
|||
public Element getXml() {
|
||||
Element textFilter;
|
||||
|
||||
textFilter = new Element("textFilter");
|
||||
textFilter = new Element("filter");
|
||||
textFilter.addAttribute("type", "text");
|
||||
|
||||
textFilter.addAttribute("label", label);
|
||||
if ((value != null) && !value.isEmpty()) {
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public class ProceedingsPropertiesStep
|
|||
|
||||
public static Component getProceedingsPropertySheet(
|
||||
ItemSelectionModel itemModel) {
|
||||
DomainObjectPropertySheet sheet = (DomainObjectPropertySheet) getPublicationPropertySheet(
|
||||
DomainObjectPropertySheet sheet = (DomainObjectPropertySheet) getPublicationWithPublisherPropertySheet(
|
||||
itemModel);
|
||||
|
||||
sheet.add(PublicationGlobalizationUtil.globalize(
|
||||
|
|
|
|||
Loading…
Reference in New Issue