Bug in den Panels für SciOrga korrigiert. Führte zu einer Exception beim Aufruf der Reiter für Kontakte und Abteilungen
git-svn-id: https://svn.libreccm.org/ccm/trunk@924 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
b8ef1b3bbb
commit
121a6e74d9
|
|
@ -85,7 +85,7 @@ public class GenericOrganizationalUnitPanel extends CompoundContentItemPanel {
|
||||||
|
|
||||||
createPaginatorElement(parent, pageNumber, pageCount, begin, end,
|
createPaginatorElement(parent, pageNumber, pageCount, begin, end,
|
||||||
count, contacts.size());
|
count, contacts.size());
|
||||||
contacts.setRange((int) begin, (int) end);
|
contacts.setRange((int) begin + 1, (int) end + 1);
|
||||||
|
|
||||||
Element contactsElem = parent.newChildElement("contacts");
|
Element contactsElem = parent.newChildElement("contacts");
|
||||||
while (contacts.next()) {
|
while (contacts.next()) {
|
||||||
|
|
@ -116,7 +116,7 @@ public class GenericOrganizationalUnitPanel extends CompoundContentItemPanel {
|
||||||
|
|
||||||
createPaginatorElement(parent, pageNumber, pageCount, begin, end,
|
createPaginatorElement(parent, pageNumber, pageCount, begin, end,
|
||||||
count, persons.size());
|
count, persons.size());
|
||||||
persons.setRange((int) begin, (int) end);
|
persons.setRange((int) begin + 1, (int) end + 1);
|
||||||
|
|
||||||
while (persons.next()) {
|
while (persons.next()) {
|
||||||
GenericPerson person;
|
GenericPerson person;
|
||||||
|
|
|
||||||
|
|
@ -158,7 +158,7 @@ public class SciDepartmentPanel extends SciOrganizationBasePanel {
|
||||||
createPaginatorElement(
|
createPaginatorElement(
|
||||||
parent, pageNumber, pageCount, begin, end, count,
|
parent, pageNumber, pageCount, begin, end, count,
|
||||||
subDepartments.size());
|
subDepartments.size());
|
||||||
subDepartments.setRange((int) begin, (int) end);
|
subDepartments.setRange((int) begin + 1, (int) end + 1);
|
||||||
|
|
||||||
while (subDepartments.next()) {
|
while (subDepartments.next()) {
|
||||||
SciDepartment subDepartment;
|
SciDepartment subDepartment;
|
||||||
|
|
@ -262,7 +262,6 @@ public class SciDepartmentPanel extends SciOrganizationBasePanel {
|
||||||
long end = getPaginatorEnd(begin, count);
|
long end = getPaginatorEnd(begin, count);
|
||||||
pageNumber = normalizePageNumber(pageCount, pageNumber);
|
pageNumber = normalizePageNumber(pageCount, pageNumber);
|
||||||
|
|
||||||
|
|
||||||
createPaginatorElement(
|
createPaginatorElement(
|
||||||
parent, pageNumber, pageCount, begin, end, count, members.
|
parent, pageNumber, pageCount, begin, end, count, members.
|
||||||
size());
|
size());
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ import com.arsdigita.cms.contenttypes.SciProject;
|
||||||
import com.arsdigita.cms.dispatcher.SimpleXMLGenerator;
|
import com.arsdigita.cms.dispatcher.SimpleXMLGenerator;
|
||||||
import com.arsdigita.domain.DomainCollection;
|
import com.arsdigita.domain.DomainCollection;
|
||||||
import com.arsdigita.domain.DomainObject;
|
import com.arsdigita.domain.DomainObject;
|
||||||
|
import com.arsdigita.kernel.permissions.PrivilegeDescriptor;
|
||||||
import com.arsdigita.persistence.DataCollection;
|
import com.arsdigita.persistence.DataCollection;
|
||||||
import com.arsdigita.persistence.DataObject;
|
import com.arsdigita.persistence.DataObject;
|
||||||
import com.arsdigita.xml.Element;
|
import com.arsdigita.xml.Element;
|
||||||
|
|
@ -97,7 +98,7 @@ public abstract class SciOrganizationBasePanel
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object obj) {
|
public boolean equals(Object obj) {
|
||||||
if (obj == null) {
|
/*if (obj == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (getClass() != obj.getClass()) {
|
if (getClass() != obj.getClass()) {
|
||||||
|
|
@ -117,18 +118,26 @@ public abstract class SciOrganizationBasePanel
|
||||||
: !this.status.equals(other.status)) {
|
: !this.status.equals(other.status)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;*/
|
||||||
|
if (obj instanceof MemberListItem) {
|
||||||
|
MemberListItem other = (MemberListItem) obj;
|
||||||
|
|
||||||
|
return member.equals(other.getMember());
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
int hash = 7;
|
/*int hash = 7;
|
||||||
hash =
|
hash =
|
||||||
79 * hash + (this.member != null ? this.member.hashCode() : 0);
|
79 * hash + (this.member != null ? this.member.hashCode() : 0);
|
||||||
hash = 79 * hash + (this.role != null ? this.role.hashCode() : 0);
|
hash = 79 * hash + (this.role != null ? this.role.hashCode() : 0);
|
||||||
hash =
|
hash =
|
||||||
79 * hash + (this.status != null ? this.status.hashCode() : 0);
|
79 * hash + (this.status != null ? this.status.hashCode() : 0);
|
||||||
return hash;
|
return hash;*/
|
||||||
|
return member.hashCode();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -154,7 +154,7 @@ public class SciOrganizationPanel extends SciOrganizationBasePanel {
|
||||||
createPaginatorElement(
|
createPaginatorElement(
|
||||||
parent, pageNumber, pageCount, begin, end, count, departments.
|
parent, pageNumber, pageCount, begin, end, count, departments.
|
||||||
size());
|
size());
|
||||||
departments.setRange((int) begin, (int) end);
|
departments.setRange((int) begin + 1, (int) end + 1);
|
||||||
|
|
||||||
while (departments.next()) {
|
while (departments.next()) {
|
||||||
SciDepartment department;
|
SciDepartment department;
|
||||||
|
|
|
||||||
|
|
@ -133,7 +133,7 @@ public class SciProjectPanel extends SciOrganizationBasePanel {
|
||||||
|
|
||||||
createPaginatorElement(parent, pageNumber, pageCount, begin, end, count,
|
createPaginatorElement(parent, pageNumber, pageCount, begin, end, count,
|
||||||
subProjects.size());
|
subProjects.size());
|
||||||
subProjects.setRange((int) begin, (int) end);
|
subProjects.setRange((int) begin + 1, (int) end + 1);
|
||||||
|
|
||||||
|
|
||||||
while (subProjects.next()) {
|
while (subProjects.next()) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue