Fehler im UI zum Verwalten der Organisationseinheiten einer Organization behoben
git-svn-id: https://svn.libreccm.org/ccm/trunk@197 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
a7ccfb0079
commit
30179898bd
|
|
@ -30,7 +30,7 @@ object type Orga2OrgaUnit extends ACSObject {
|
||||||
}
|
}
|
||||||
|
|
||||||
association {
|
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;
|
composite Orga2OrgaUnit[0..n] units = join ct_genericorganizations.organization_id to ct_orga2orgaunits.owner_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
<ctd:content-type
|
<ctd:content-type
|
||||||
label="GenericOrganization"
|
label="GenericOrganization"
|
||||||
description="A generic, GenericOrganization type"
|
description="A generic organization type"
|
||||||
objectType="com.arsdigita.cms.contenttypes.GenericOrganization"
|
objectType="com.arsdigita.cms.contenttypes.GenericOrganization"
|
||||||
classname="com.arsdigita.cms.contenttypes.GenericOrganization">
|
classname="com.arsdigita.cms.contenttypes.GenericOrganization">
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,7 @@ public class Orga2OrgaUnit extends ACSObject {
|
||||||
|
|
||||||
public void setUnitOwner(GenericOrganization orga) {
|
public void setUnitOwner(GenericOrganization orga) {
|
||||||
Assert.exists(orga, GenericOrganization.class);
|
Assert.exists(orga, GenericOrganization.class);
|
||||||
|
logger.debug(String.format("Setting unit owner to %s", orga.getOrganizationName()));
|
||||||
setAssociation(UNITOWNER, orga);
|
setAssociation(UNITOWNER, orga);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -123,7 +124,7 @@ public class Orga2OrgaUnit extends ACSObject {
|
||||||
swapWithNext("com.arsdigita.cms.contenttypes.allUnitsOrderForOrganization", "com.arsdigita.cms.contenttypes.swapOrga2OrgaUnitWithNextInGroup");
|
swapWithNext("com.arsdigita.cms.contenttypes.allUnitsOrderForOrganization", "com.arsdigita.cms.contenttypes.swapOrga2OrgaUnitWithNextInGroup");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void swapWithPrevious() {
|
public void swapWithPrevious() {
|
||||||
swapWithPrevious("com.arsdigita.cms.contenttypes.allUnitsOrderForOrganization", "com.arsdigita.cms.contenttypes.swapOrga2OrgaUnitWithNextInGroup");
|
swapWithPrevious("com.arsdigita.cms.contenttypes.allUnitsOrderForOrganization", "com.arsdigita.cms.contenttypes.swapOrga2OrgaUnitWithNextInGroup");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -136,7 +137,7 @@ public class Orga2OrgaUnit extends ACSObject {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected DataQuery getSwapQuery(String queryName) {
|
protected DataQuery getSwapQuery(String queryName) {
|
||||||
DataQuery query = SessionManager.getSession().retrieve(queryName);
|
DataQuery query = SessionManager.getSession().retrieveQuery(queryName);
|
||||||
query.setParameter("ownerID", getUnitOwner().getID());
|
query.setParameter("ownerID", getUnitOwner().getID());
|
||||||
return query;
|
return query;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -53,10 +53,10 @@ public class Orga2OrgaUnitPropertyForm extends FormSection implements FormInitLi
|
||||||
addSubmissionListener(this);
|
addSubmissionListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void addWidgets() {
|
protected void addWidgets() {
|
||||||
add(new Label("OrganizationalUnit"));
|
add(new Label("OrganizationalUnit"));
|
||||||
this.m_itemSearch = new ItemSearchWidget(ITEM_SEARCH, ContentType.findByAssociatedObjectType("com.arsdigita.cms.contenttypes.OrganizationalUnit"));
|
this.m_itemSearch = new ItemSearchWidget(ITEM_SEARCH, ContentType.findByAssociatedObjectType("com.arsdigita.cms.contenttypes.OrganizationalUnit"));
|
||||||
add(this.m_itemSearch);
|
add(this.m_itemSearch);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addSaveCancelSection() {
|
public void addSaveCancelSection() {
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,12 @@ public class Orga2OrgaUnitTable extends Table {
|
||||||
int i = 0;
|
int i = 0;
|
||||||
this.m_orgaUnitCol = new TableColumn(i, "Organizational Unit");
|
this.m_orgaUnitCol = new TableColumn(i, "Organizational Unit");
|
||||||
this.m_editCol = new TableColumn(++i, "Edit");
|
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_delCol);
|
||||||
model.add(this.m_moveUpCol);
|
model.add(this.m_moveUpCol);
|
||||||
model.add(this.m_moveDownCol);
|
model.add(this.m_moveDownCol);
|
||||||
|
|
|
||||||
|
|
@ -25,8 +25,8 @@ public class OrganizationalUnitPropertiesStep extends SimpleEditStep {
|
||||||
private final static Logger logger = Logger.getLogger(OrganizationalUnitPropertiesStep.class);
|
private final static Logger logger = Logger.getLogger(OrganizationalUnitPropertiesStep.class);
|
||||||
public final static String EDIT_SHEET_NAME = "edit";
|
public final static String EDIT_SHEET_NAME = "edit";
|
||||||
|
|
||||||
public OrganizationalUnitPropertiesStep(ItemSelectionModel itemModel, AuthoringKitWizard parent) {
|
public OrganizationalUnitPropertiesStep(ItemSelectionModel itemModel, AuthoringKitWizard parent) {
|
||||||
super(itemModel, parent);
|
super(itemModel, parent);
|
||||||
|
|
||||||
setDefaultEditKey(EDIT_SHEET_NAME);
|
setDefaultEditKey(EDIT_SHEET_NAME);
|
||||||
BasicPageForm editSheet;
|
BasicPageForm editSheet;
|
||||||
|
|
@ -34,10 +34,10 @@ public class OrganizationalUnitPropertiesStep extends SimpleEditStep {
|
||||||
editSheet = new OrganizationalUnitPropertyForm(itemModel, this);
|
editSheet = new OrganizationalUnitPropertyForm(itemModel, this);
|
||||||
add(EDIT_SHEET_NAME, "Edit", new WorkflowLockedComponentAccess(editSheet, itemModel), editSheet.getSaveCancelSection().getCancelButton());
|
add(EDIT_SHEET_NAME, "Edit", new WorkflowLockedComponentAccess(editSheet, itemModel), editSheet.getSaveCancelSection().getCancelButton());
|
||||||
|
|
||||||
setDisplayComponent(getOrganizationalUnitPropertySheet(itemModel));
|
setDisplayComponent(getOrganizationalUnitPropertySheet(itemModel));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Component getOrganizationalUnitPropertySheet(ItemSelectionModel itemModel) {
|
public static Component getOrganizationalUnitPropertySheet(ItemSelectionModel itemModel) {
|
||||||
DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(itemModel);
|
DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(itemModel);
|
||||||
|
|
||||||
sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.organizatialunit.unitname"), OrganizationalUnit.ORGANIZATIONALUNIT_NAME);
|
sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.organizatialunit.unitname"), OrganizationalUnit.ORGANIZATIONALUNIT_NAME);
|
||||||
|
|
@ -56,7 +56,7 @@ public class OrganizationalUnitPropertiesStep extends SimpleEditStep {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return sheet;
|
return sheet;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -41,7 +41,7 @@ public class OrganizationalUnitPropertyForm extends BasicPageForm implements For
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addWidgets() {
|
public void addWidgets() {
|
||||||
super.addWidgets();
|
super.addWidgets();
|
||||||
|
|
||||||
add(new Label(GlobalizationUtil.globalize("cms.contenttypes.organizationalunit.ui.unitname")));
|
add(new Label(GlobalizationUtil.globalize("cms.contenttypes.organizationalunit.ui.unitname")));
|
||||||
|
|
@ -54,20 +54,20 @@ public class OrganizationalUnitPropertyForm extends BasicPageForm implements For
|
||||||
TextArea description = new TextArea(ORGANIZATIONALUNIT_DESCRIPTION);
|
TextArea description = new TextArea(ORGANIZATIONALUNIT_DESCRIPTION);
|
||||||
description.setRows(5);
|
description.setRows(5);
|
||||||
description.setCols(30);
|
description.setCols(30);
|
||||||
add(description);
|
add(description);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(FormSectionEvent e) throws FormProcessException {
|
public void init(FormSectionEvent e) throws FormProcessException {
|
||||||
FormData data = e.getFormData();
|
FormData data = e.getFormData();
|
||||||
OrganizationalUnit orgaUnit = (OrganizationalUnit) super.initBasicWidgets(e);
|
OrganizationalUnit orgaUnit = (OrganizationalUnit) super.initBasicWidgets(e);
|
||||||
|
|
||||||
data.put(ORGANIZATIONALUNIT_NAME, orgaUnit.getOrganizationalUnitName());
|
data.put(ORGANIZATIONALUNIT_NAME, orgaUnit.getOrganizationalUnitName());
|
||||||
data.put(ORGANIZATIONALUNIT_DESCRIPTION, orgaUnit.getOrganizationalUnitDescription());
|
data.put(ORGANIZATIONALUNIT_DESCRIPTION, orgaUnit.getOrganizationalUnitDescription());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void process(FormSectionEvent e) throws FormProcessException {
|
public void process(FormSectionEvent e) throws FormProcessException {
|
||||||
FormData data = e.getFormData();
|
FormData data = e.getFormData();
|
||||||
|
|
||||||
OrganizationalUnit orgaUnit = (OrganizationalUnit) super.processBasicWidgets(e);
|
OrganizationalUnit orgaUnit = (OrganizationalUnit) super.processBasicWidgets(e);
|
||||||
|
|
@ -81,14 +81,13 @@ public class OrganizationalUnitPropertyForm extends BasicPageForm implements For
|
||||||
|
|
||||||
if (this.m_step != null) {
|
if (this.m_step != null) {
|
||||||
this.m_step.maybeForwardToNextStep(e.getPageState());
|
this.m_step.maybeForwardToNextStep(e.getPageState());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void submitted(FormSectionEvent e) throws FormProcessException {
|
public void submitted(FormSectionEvent e) throws FormProcessException {
|
||||||
if ((this.m_step != null) &&
|
if ((this.m_step != null) &&
|
||||||
(getSaveCancelSection().getCancelButton().isSelected(e.getPageState()))) {
|
(getSaveCancelSection().getCancelButton().isSelected(e.getPageState()))) {
|
||||||
this.m_step.cancelStreamlinedCreation(e.getPageState());
|
this.m_step.cancelStreamlinedCreation(e.getPageState());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -965,6 +965,11 @@ public class Page extends BlockStylable implements Container {
|
||||||
Assert.assertNotLocked(this);
|
Assert.assertNotLocked(this);
|
||||||
|
|
||||||
if ( ! stateContains(c) ) {
|
if ( ! stateContains(c) ) {
|
||||||
|
if(c == null) {
|
||||||
|
s_log.error("c is null");
|
||||||
|
} else {
|
||||||
|
//s_log.error("c: " + c.toString());
|
||||||
|
}
|
||||||
String key = c.getKey();
|
String key = c.getKey();
|
||||||
if (key == null) {
|
if (key == null) {
|
||||||
key = Integer.toString(m_components.size());
|
key = Integer.toString(m_components.size());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue