Fehler im UI zum Verwalten der Organisationseinheiten einer Organization behoben

git-svn-id: https://svn.libreccm.org/ccm/trunk@197 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2009-06-20 07:48:12 +00:00
parent a7ccfb0079
commit 30179898bd
8 changed files with 31 additions and 20 deletions

View File

@ -30,7 +30,7 @@ object type Orga2OrgaUnit extends ACSObject {
}
association {
composite GenericOrganization[0..1] unitOwner = join ct_orga2orgaunits.unit_owner to ct_genericorganizations.organization_id;
composite GenericOrganization[0..1] unitOwner = join ct_orga2orgaunits.owner_id to ct_genericorganizations.organization_id;
composite Orga2OrgaUnit[0..n] units = join ct_genericorganizations.organization_id to ct_orga2orgaunits.owner_id;
}

View File

@ -6,7 +6,7 @@
<ctd:content-type
label="GenericOrganization"
description="A generic, GenericOrganization type"
description="A generic organization type"
objectType="com.arsdigita.cms.contenttypes.GenericOrganization"
classname="com.arsdigita.cms.contenttypes.GenericOrganization">

View File

@ -66,6 +66,7 @@ public class Orga2OrgaUnit extends ACSObject {
public void setUnitOwner(GenericOrganization orga) {
Assert.exists(orga, GenericOrganization.class);
logger.debug(String.format("Setting unit owner to %s", orga.getOrganizationName()));
setAssociation(UNITOWNER, orga);
}
@ -136,7 +137,7 @@ public class Orga2OrgaUnit extends ACSObject {
}
protected DataQuery getSwapQuery(String queryName) {
DataQuery query = SessionManager.getSession().retrieve(queryName);
DataQuery query = SessionManager.getSession().retrieveQuery(queryName);
query.setParameter("ownerID", getUnitOwner().getID());
return query;
}

View File

@ -77,6 +77,12 @@ public class Orga2OrgaUnitTable extends Table {
int i = 0;
this.m_orgaUnitCol = new TableColumn(i, "Organizational Unit");
this.m_editCol = new TableColumn(++i, "Edit");
this.m_delCol = new TableColumn(++i, "Delete");
this.m_moveUpCol = new TableColumn(++i, "");
this.m_moveDownCol = new TableColumn(++i, "");
model.add(this.m_orgaUnitCol);
model.add(this.m_editCol);
model.add(this.m_delCol);
model.add(this.m_moveUpCol);
model.add(this.m_moveDownCol);

View File

@ -82,7 +82,6 @@ public class OrganizationalUnitPropertyForm extends BasicPageForm implements For
if (this.m_step != null) {
this.m_step.maybeForwardToNextStep(e.getPageState());
}
}
public void submitted(FormSectionEvent e) throws FormProcessException {

View File

@ -965,6 +965,11 @@ public class Page extends BlockStylable implements Container {
Assert.assertNotLocked(this);
if ( ! stateContains(c) ) {
if(c == null) {
s_log.error("c is null");
} else {
//s_log.error("c: " + c.toString());
}
String key = c.getKey();
if (key == null) {
key = Integer.toString(m_components.size());