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,
|
||||
count, contacts.size());
|
||||
contacts.setRange((int) begin, (int) end);
|
||||
contacts.setRange((int) begin + 1, (int) end + 1);
|
||||
|
||||
Element contactsElem = parent.newChildElement("contacts");
|
||||
while (contacts.next()) {
|
||||
|
|
@ -116,7 +116,7 @@ public class GenericOrganizationalUnitPanel extends CompoundContentItemPanel {
|
|||
|
||||
createPaginatorElement(parent, pageNumber, pageCount, begin, end,
|
||||
count, persons.size());
|
||||
persons.setRange((int) begin, (int) end);
|
||||
persons.setRange((int) begin + 1, (int) end + 1);
|
||||
|
||||
while (persons.next()) {
|
||||
GenericPerson person;
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ public class SciDepartmentPanel extends SciOrganizationBasePanel {
|
|||
createPaginatorElement(
|
||||
parent, pageNumber, pageCount, begin, end, count,
|
||||
subDepartments.size());
|
||||
subDepartments.setRange((int) begin, (int) end);
|
||||
subDepartments.setRange((int) begin + 1, (int) end + 1);
|
||||
|
||||
while (subDepartments.next()) {
|
||||
SciDepartment subDepartment;
|
||||
|
|
@ -262,7 +262,6 @@ public class SciDepartmentPanel extends SciOrganizationBasePanel {
|
|||
long end = getPaginatorEnd(begin, count);
|
||||
pageNumber = normalizePageNumber(pageCount, pageNumber);
|
||||
|
||||
|
||||
createPaginatorElement(
|
||||
parent, pageNumber, pageCount, begin, end, count, members.
|
||||
size());
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ import com.arsdigita.cms.contenttypes.SciProject;
|
|||
import com.arsdigita.cms.dispatcher.SimpleXMLGenerator;
|
||||
import com.arsdigita.domain.DomainCollection;
|
||||
import com.arsdigita.domain.DomainObject;
|
||||
import com.arsdigita.kernel.permissions.PrivilegeDescriptor;
|
||||
import com.arsdigita.persistence.DataCollection;
|
||||
import com.arsdigita.persistence.DataObject;
|
||||
import com.arsdigita.xml.Element;
|
||||
|
|
@ -97,7 +98,7 @@ public abstract class SciOrganizationBasePanel
|
|||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == null) {
|
||||
/*if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
|
|
@ -117,18 +118,26 @@ public abstract class SciOrganizationBasePanel
|
|||
: !this.status.equals(other.status)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return true;*/
|
||||
if (obj instanceof MemberListItem) {
|
||||
MemberListItem other = (MemberListItem) obj;
|
||||
|
||||
return member.equals(other.getMember());
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 7;
|
||||
/*int hash = 7;
|
||||
hash =
|
||||
79 * hash + (this.member != null ? this.member.hashCode() : 0);
|
||||
hash = 79 * hash + (this.role != null ? this.role.hashCode() : 0);
|
||||
hash =
|
||||
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(
|
||||
parent, pageNumber, pageCount, begin, end, count, departments.
|
||||
size());
|
||||
departments.setRange((int) begin, (int) end);
|
||||
departments.setRange((int) begin + 1, (int) end + 1);
|
||||
|
||||
while (departments.next()) {
|
||||
SciDepartment department;
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ public class SciProjectPanel extends SciOrganizationBasePanel {
|
|||
|
||||
createPaginatorElement(parent, pageNumber, pageCount, begin, end, count,
|
||||
subProjects.size());
|
||||
subProjects.setRange((int) begin, (int) end);
|
||||
subProjects.setRange((int) begin + 1, (int) end + 1);
|
||||
|
||||
|
||||
while (subProjects.next()) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue