diff --git a/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericOrganizationalUnit.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericOrganizationalUnit.java index 18abeb18a..4c66eb9c3 100644 --- a/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericOrganizationalUnit.java +++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/GenericOrganizationalUnit.java @@ -114,8 +114,7 @@ public class GenericOrganizationalUnit extends ContentPage { DataObject link = add(PERSONS, person); - link.set(ROLE, role); - link.set(PERSON_ORDER, BigDecimal.valueOf(getPersons().size())); + link.set(ROLE, role); } public void removePerson(GenericPerson person) { diff --git a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitPersonsTable.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitPersonsTable.java index 27fab4c68..1a6ed7d11 100644 --- a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitPersonsTable.java +++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitPersonsTable.java @@ -143,11 +143,7 @@ public class GenericOrganizationalUnitPersonsTable extends Table implements public Object getElementAt(int columnIndex) { switch (columnIndex) { case 0: - return String.format("%s %s %s %s", - m_person.getTitlePre(), - m_person.getGivenName(), - m_person.getSurname(), - m_person.getTitlePost()); + return m_person.getFullName(); case 1: return m_personsCollection.getRoleName(); case 2: diff --git a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitPropertiesStep.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitPropertiesStep.java index 3ad647b79..547785a59 100644 --- a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitPropertiesStep.java +++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitPropertiesStep.java @@ -55,6 +55,9 @@ public class GenericOrganizationalUnitPropertiesStep extends SimpleEditStep { sheet.add(ContenttypesGlobalizationUtil.globalize( "cms.contenttypes.ui.genericorganunit.name"), GenericOrganizationalUnit.NAME); + sheet.add(ContenttypesGlobalizationUtil.globalize( + "cms.contenttypes.ui.genericorgaunit.title"), + GenericOrganizationalUnit.TITLE); sheet.add(ContenttypesGlobalizationUtil.globalize( "cms.contenttypes.ui.genericorganunit.addendum"), GenericOrganizationalUnit.ADDENDUM); diff --git a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitPropertyForm.java b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitPropertyForm.java index fc1a8f013..3a1e0b9ba 100644 --- a/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitPropertyForm.java +++ b/ccm-cms/src/com/arsdigita/cms/contenttypes/ui/GenericOrganizationalUnitPropertyForm.java @@ -120,10 +120,6 @@ public class GenericOrganizationalUnitPropertyForm orgaunit.setAddendum((String) data.get(ADDENDUM)); orgaunit.save(); - } - - if (m_step != null) { - m_step.maybeForwardToNextStep(fse.getPageState()); - } + } } } diff --git a/ccm-sci-publications/pdl/com/arsdigita/content-types/CollectedVolume.pdl b/ccm-sci-publications/pdl/com/arsdigita/content-types/CollectedVolume.pdl index 5360958e0..a3a852a0e 100644 --- a/ccm-sci-publications/pdl/com/arsdigita/content-types/CollectedVolume.pdl +++ b/ccm-sci-publications/pdl/com/arsdigita/content-types/CollectedVolume.pdl @@ -31,7 +31,7 @@ object type CollectedVolume extends PublicationWithPublisher { association { - CollectedVolume[0..1] collectedVolume = join ct_article_in_collected_volume.article_id + CollectedVolume[0..n] collectedVolume = join ct_article_in_collected_volume.article_id to ct_collected_volume_article_map.article_id, join ct_collected_volume_article_map.collected_volume_id to ct_collected_volume.collected_volume_id; diff --git a/ccm-sci-publications/pdl/com/arsdigita/content-types/Proceedings.pdl b/ccm-sci-publications/pdl/com/arsdigita/content-types/Proceedings.pdl index a95eeba7e..3b1ab1cbb 100644 --- a/ccm-sci-publications/pdl/com/arsdigita/content-types/Proceedings.pdl +++ b/ccm-sci-publications/pdl/com/arsdigita/content-types/Proceedings.pdl @@ -37,7 +37,7 @@ object type Proceedings extends PublicationWithPublisher { association { - Proceedings[0..1] proceedings = join ct_inproceedings.inproceedings_id + Proceedings[0..n] proceedings = join ct_inproceedings.inproceedings_id to ct_proceedings_papers_map.paper_id, join ct_proceedings_papers_map.proceedings_id to ct_proceedings.proceedings_id; diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/Proceedings.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/Proceedings.java index 1356efa5f..8d318ad52 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/Proceedings.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/Proceedings.java @@ -108,7 +108,7 @@ public class Proceedings extends PublicationWithPublisher { } public Date getDateToOfConference() { - return (Date) get(DATE_FROM_OF_CONFERENCE); + return (Date) get(DATE_TO_OF_CONFERENCE); } public void setDateToOfConference(Date dateTo) { diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/doc-files/PublicationModule.png b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/doc-files/PublicationModule.png index 58ac481ee..59c07ed7d 100644 Binary files a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/doc-files/PublicationModule.png and b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/doc-files/PublicationModule.png differ diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/InProceedingsPropertyForm.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/InProceedingsPropertyForm.java index a725d426e..ba7dbfbde 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/InProceedingsPropertyForm.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/InProceedingsPropertyForm.java @@ -49,7 +49,7 @@ public class InProceedingsPropertyForm add(pagesFrom); add(new Label((String) PublicationGlobalizationUtil.globalize( - "publications.ui.inproceedings.pages_from").localize())); + "publications.ui.inproceedings.pages_to").localize())); ParameterModel pagesToParam = new IntegerParameter(InProceedings.PAGES_TO); TextField pagesTo = new TextField(pagesToParam); diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ProceedingsPapersTable.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ProceedingsPapersTable.java index e19cfd6bc..1d81b44d2 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ProceedingsPapersTable.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ProceedingsPapersTable.java @@ -239,7 +239,7 @@ public class ProceedingsPapersTable PageState state, Object value, boolean isSelected, - Object key, + Object key, int row, int col) { if (0 == row) { @@ -267,13 +267,13 @@ public class ProceedingsPapersTable int row, int col) { - CollectedVolume collectedVolume = - (CollectedVolume) m_itemModel.getSelectedObject( + Proceedings proceedings = + (Proceedings) m_itemModel.getSelectedObject( state); - ArticleInCollectedVolumeCollection articles = - collectedVolume.getArticles(); + InProceedingsCollection papers = + proceedings.getPapers(); - if ((articles.size() - 1) + if ((papers.size() - 1) == row) { s_log.debug("Row is last row in table, don't show down link"); Label label = new Label(""); diff --git a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ProceedingsPropertyForm.java b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ProceedingsPropertyForm.java index d13b54041..e5d05fd7d 100644 --- a/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ProceedingsPropertyForm.java +++ b/ccm-sci-publications/src/com/arsdigita/cms/contenttypes/ui/ProceedingsPropertyForm.java @@ -83,9 +83,9 @@ public class ProceedingsPropertyForm add(dateFrom); add(new Label(PublicationGlobalizationUtil.globalize( - "publications.ui.proceedings.date_from_of_conference"))); + "publications.ui.proceedings.date_to_of_conference"))); ParameterModel dateToParam = new DateParameter( - Proceedings.DATE_FROM_OF_CONFERENCE); + Proceedings.DATE_TO_OF_CONFERENCE); Date dateTo = new Date(dateToParam); dateTo.setYearRange(1900, today.get(Calendar.YEAR) + 3); add(dateTo); diff --git a/ccm-sci-types-organization/pdl/com/arsdigita/content-types/SciDepartment.pdl b/ccm-sci-types-organization/pdl/com/arsdigita/content-types/SciDepartment.pdl index 649fde97a..9680422ed 100644 --- a/ccm-sci-types-organization/pdl/com/arsdigita/content-types/SciDepartment.pdl +++ b/ccm-sci-types-organization/pdl/com/arsdigita/content-types/SciDepartment.pdl @@ -4,34 +4,34 @@ import com.arsdigita.kernel.ACSObject; import com.arsdigita.cms.*; object type SciDepartment extends GenericOrganizationalUnit { - String[0..1] departmentDescription = ct_scidepartments.description; + String[0..1] departmentDescription = ct_scidepartments.description VARCHAR(4096); reference key ( ct_scidepartments.department_id ); } association { - SciDepartment[0..1] department = join ct_scidepartments.department_id - to ct_scidepartments_subdepartments_map.department_id, - join ct_scidepartments_subdepartments_map.subdepartment_id - to ct_scidepartments.department_id; - SciDepartment[0..n] subDepartments = join ct_scidepartments.department_id + SciDepartment[0..n] department = join ct_scidepartments.department_id to ct_scidepartments_subdepartments_map.subdepartment_id, join ct_scidepartments_subdepartments_map.department_id to ct_scidepartments.department_id; + SciDepartment[0..n] subDepartments = join ct_scidepartments.department_id + to ct_scidepartments_subdepartments_map.department_id, + join ct_scidepartments_subdepartments_map.subdepartment_id + to ct_scidepartments.department_id; Integer[0..1] subDepartmentOrder = ct_scidepartments_subdepartments_map.subdepartments_order INTEGER; } association { - SciDepartment[0..1] department = join ct_scidepartments.department_id - to ct_scidepartments_projects_map.department_id, - join ct_scidepartments_projects_map.project_id - to ct_sciprojects.project_id; - - SciProject[0..n] projects = join ct_sciprojects.project_id + SciDepartment[0..n] department = join ct_sciprojects.project_id to ct_scidepartments_projects_map.project_id, join ct_scidepartments_projects_map.department_id to ct_scidepartments.department_id; + SciProject[0..n] projects = join ct_scidepartments.department_id + to ct_scidepartments_projects_map.department_id, + join ct_scidepartments_projects_map.project_id + to ct_sciprojects.project_id; + Integer[0..1] projectOrder = ct_scidepartments_projects_map.projectorder INTEGER; } \ No newline at end of file diff --git a/ccm-sci-types-organization/pdl/com/arsdigita/content-types/SciOrganization.pdl b/ccm-sci-types-organization/pdl/com/arsdigita/content-types/SciOrganization.pdl index 1569a7531..6aa04c647 100644 --- a/ccm-sci-types-organization/pdl/com/arsdigita/content-types/SciOrganization.pdl +++ b/ccm-sci-types-organization/pdl/com/arsdigita/content-types/SciOrganization.pdl @@ -4,36 +4,36 @@ import com.arsdigita.kernel.ACSObject; import com.arsdigita.cms.*; object type SciOrganization extends GenericOrganizationalUnit { - String[0..1] organizationDescription = ct_sciorganizations.description; + String[0..1] organizationDescription = ct_sciorganizations.description VARCHAR(4096); reference key ( ct_sciorganizations.organization_id ); } association { - SciOrganization[0..1] organization = join ct_sciorganizations.organization_id - to ct_sciorganizations_departments_map.organization_id, - join ct_sciorganizations_departments_map.department_id - to ct_scidepartments.department_id; - - SciDepartment[0..n] departments = join ct_scidepartments.department_id + SciOrganization[0..n] organization = join ct_scidepartments.department_id to ct_sciorganizations_departments_map.department_id, join ct_sciorganizations_departments_map.organization_id to ct_sciorganizations.organization_id; + SciDepartment[0..n] departments = join ct_sciorganizations.organization_id + to ct_sciorganizations_departments_map.organization_id, + join ct_sciorganizations_departments_map.department_id + to ct_scidepartments.department_id; + Integer[0..1] departmentOrder = ct_sciorganizations_departments_map.department_order INTEGER; } association { - SciOrganization[0..1] organization = join ct_sciorganizations.organization_id - to ct_sciorganizations_projects_map.organization_id, - join ct_sciorganizations_projects_map.project_id - to ct_sciprojects.project_id; - - SciProject[0..n] projects = join ct_sciprojects.project_id + SciOrganization[0..n] organization = join ct_sciprojects.project_id to ct_sciorganizations_projects_map.project_id, join ct_sciorganizations_projects_map.organization_id to ct_sciorganizations.organization_id; + SciProject[0..n] projects = join ct_sciorganizations.organization_id + to ct_sciorganizations_projects_map.organization_id, + join ct_sciorganizations_projects_map.project_id + to ct_sciprojects.project_id; + Integer[0..1] projectOrder = ct_sciorganizations_projects_map.project_order INTEGER; } diff --git a/ccm-sci-types-organization/pdl/com/arsdigita/content-types/SciProject.pdl b/ccm-sci-types-organization/pdl/com/arsdigita/content-types/SciProject.pdl index fe04755a6..89588392b 100644 --- a/ccm-sci-types-organization/pdl/com/arsdigita/content-types/SciProject.pdl +++ b/ccm-sci-types-organization/pdl/com/arsdigita/content-types/SciProject.pdl @@ -14,15 +14,15 @@ object type SciProject extends GenericOrganizationalUnit { } association { - SciProject[0..1] project = join ct_sciprojects.project_id - to ct_sciprojects_subprojects_map.project_id, - join ct_sciprojects_subprojects_map.subproject_id - to ct_sciprojects.project_id; - - SciProject[0..n] subProjects = join ct_sciprojects.project_id + SciProject[0..n] project = join ct_sciprojects.project_id to ct_sciprojects_subprojects_map.subproject_id, join ct_sciprojects_subprojects_map.project_id to ct_sciprojects.project_id; + + SciProject[0..n] subProjects = join ct_sciprojects.project_id + to ct_sciprojects_subprojects_map.project_id, + join ct_sciprojects_subprojects_map.subproject_id + to ct_sciprojects.project_id; Integer[0..1] subProjectOrder = ct_sciprojects_subprojects_map.subprojectorder INTEGER; diff --git a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciDepartmentProjectsTable.java b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciDepartmentProjectsTable.java index 9adc03e0c..8ba2cd918 100644 --- a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciDepartmentProjectsTable.java +++ b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciDepartmentProjectsTable.java @@ -270,7 +270,12 @@ public class SciDepartmentProjectsTable int row, int col) { - if (0 == row) { + SciDepartment department = (SciDepartment) m_itemModel.getSelectedObject( + state); + SciDepartmentProjectsCollection projects = + department.getProjects(); + + if ((projects.size() - 1) == row) { Label label = new Label(""); return label; } else { @@ -283,7 +288,7 @@ public class SciDepartmentProjectsTable } } - @Override + @Override public void cellSelected(TableActionEvent event) { PageState state = event.getPageState(); @@ -291,10 +296,10 @@ public class SciDepartmentProjectsTable new BigDecimal(event.getRowKey().toString())); SciDepartment department = - (SciDepartment) m_itemModel.getSelectedObject(state); + (SciDepartment) m_itemModel.getSelectedObject(state); SciDepartmentProjectsCollection projects = - department.getProjects(); + department.getProjects(); TableColumn column = getColumnModel().get(event.getColumn().intValue()); diff --git a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciDepartmentPropertiesStep.java b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciDepartmentPropertiesStep.java index e55d5d139..fa900722e 100644 --- a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciDepartmentPropertiesStep.java +++ b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciDepartmentPropertiesStep.java @@ -1,11 +1,13 @@ package com.arsdigita.cms.contenttypes.ui; +import com.arsdigita.bebop.Component; import com.arsdigita.bebop.Label; import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; import com.arsdigita.cms.ui.authoring.BasicPageForm; import com.arsdigita.cms.ui.authoring.SimpleEditStep; import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; +import com.arsdigita.toolbox.ui.DomainObjectPropertySheet; /** * @@ -19,6 +21,15 @@ public class SciDepartmentPropertiesStep super(itemModel, parent); } + public static Component getSciDepartmentPropertySheet( + ItemSelectionModel itemModel) { + DomainObjectPropertySheet sheet = + (DomainObjectPropertySheet) GenericOrganizationalUnitPropertiesStep. + getGenericOrganizationalUnitPropertySheet(itemModel); + + return sheet; + } + @Override protected void addBasicProperties(ItemSelectionModel itemModel, AuthoringKitWizard parent) { diff --git a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciDepartmentSubDepartmentsTable.java b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciDepartmentSubDepartmentsTable.java index f1d4f024f..be1042d53 100644 --- a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciDepartmentSubDepartmentsTable.java +++ b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciDepartmentSubDepartmentsTable.java @@ -254,7 +254,7 @@ public class SciDepartmentSubDepartmentsTable } } - private class DownCellRenderer + private class DownCellRenderer extends LockableImpl implements TableCellRenderer { @@ -268,7 +268,12 @@ public class SciDepartmentSubDepartmentsTable int row, int col) { - if (0 == row) { + SciDepartment department = (SciDepartment) m_itemModel. + getSelectedObject(state); + SciDepartmentSubDepartmentsCollection subDepartments = + department.getSubDepartments(); + + if ((subDepartments.size() - 1) == row) { Label label = new Label(""); return label; } else { @@ -281,7 +286,7 @@ public class SciDepartmentSubDepartmentsTable } } - @Override + @Override public void cellSelected(TableActionEvent event) { PageState state = event.getPageState(); @@ -289,10 +294,10 @@ public class SciDepartmentSubDepartmentsTable new BigDecimal(event.getRowKey().toString())); SciDepartment department = - (SciDepartment) m_itemModel.getSelectedObject(state); + (SciDepartment) m_itemModel.getSelectedObject(state); SciDepartmentSubDepartmentsCollection subdepartments = - department.getSubDepartments(); + department.getSubDepartments(); TableColumn column = getColumnModel().get(event.getColumn().intValue()); @@ -300,9 +305,9 @@ public class SciDepartmentSubDepartmentsTable } else if (column.getHeaderKey().toString().equals(TABLE_COL_DEL)) { department.removeSubDepartment(department); } else if (column.getHeaderKey().toString().equals(TABLE_COL_UP)) { - subdepartments.swapWithPrevious(department); + subdepartments.swapWithPrevious(subdepartment); } else if (column.getHeaderKey().toString().equals(TABLE_COL_DOWN)) { - subdepartments.swapWithNext(department); + subdepartments.swapWithNext(subdepartment); } } diff --git a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciOrganizationDepartmentsTable.java b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciOrganizationDepartmentsTable.java index cc9aab56b..01768e394 100644 --- a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciOrganizationDepartmentsTable.java +++ b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciOrganizationDepartmentsTable.java @@ -269,7 +269,12 @@ public class SciOrganizationDepartmentsTable int row, int col) { - if (0 == row) { + SciOrganization orga = (SciOrganization) m_itemModel. + getSelectedObject(state); + SciOrganizationDepartmentsCollection departments = orga. + getDepartments(); + + if ((departments.size() - 1) == row) { Label label = new Label(""); return label; } else { diff --git a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciOrganizationProjectsTable.java b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciOrganizationProjectsTable.java index 217e3de4f..8596aa468 100644 --- a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciOrganizationProjectsTable.java +++ b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciOrganizationProjectsTable.java @@ -270,7 +270,12 @@ public class SciOrganizationProjectsTable int row, int col) { - if (0 == row) { + SciOrganization orga = (SciOrganization) m_itemModel. + getSelectedObject(state); + SciOrganizationProjectsCollection projects = orga. + getProjects(); + + if ((projects.size() - 1) == row) { Label label = new Label(""); return label; } else { diff --git a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciOrganizationPropertyForm.java b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciOrganizationPropertyForm.java index 16229cc13..855a7f0ee 100644 --- a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciOrganizationPropertyForm.java +++ b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciOrganizationPropertyForm.java @@ -6,6 +6,7 @@ import com.arsdigita.bebop.Label; import com.arsdigita.bebop.event.FormInitListener; import com.arsdigita.bebop.event.FormProcessListener; import com.arsdigita.bebop.event.FormSectionEvent; +import com.arsdigita.bebop.event.FormSubmissionListener; import com.arsdigita.bebop.form.TextArea; import com.arsdigita.bebop.parameters.ParameterModel; import com.arsdigita.bebop.parameters.StringParameter; @@ -19,7 +20,8 @@ import com.arsdigita.cms.contenttypes.SciOrganization; public class SciOrganizationPropertyForm extends GenericOrganizationalUnitPropertyForm implements FormProcessListener, - FormInitListener { + FormInitListener, + FormSubmissionListener { public static final String ID = "SciOrganizationEdit"; @@ -64,16 +66,16 @@ public class SciOrganizationPropertyForm super.process(fse); FormData data = fse.getFormData(); - SciOrganization organization = (SciOrganization) super.processBasicWidgets(fse); + SciOrganization organization = (SciOrganization) super. + processBasicWidgets(fse); if ((organization != null) && getSaveCancelSection().getSaveButton(). isSelected(fse.getPageState())) { - organization.setDescription((String) data.get( + + organization.setOrganizationDescription((String) data.get( SciOrganization.ORGANIZATION_DESCRIPTION)); organization.save(); - - init(fse); } } } diff --git a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciProjectPropertyForm.java b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciProjectPropertyForm.java index 0cc0866dd..6505d339e 100644 --- a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciProjectPropertyForm.java +++ b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciProjectPropertyForm.java @@ -42,7 +42,8 @@ public class SciProjectPropertyForm Label descLabel = new Label(SciOrganizationGlobalizationUtil.globalize( "sciorganizations.ui.project.description")); add(descLabel); - ParameterModel descParam = new StringParameter(SciProject.PROJECT_DESCRIPTION); + ParameterModel descParam = new StringParameter( + SciProject.PROJECT_DESCRIPTION); TextArea desc = new TextArea(descParam); desc.setCols(60); desc.setRows(18); @@ -56,7 +57,8 @@ public class SciProjectPropertyForm FormData data = fse.getFormData(); SciProject project = (SciProject) super.initBasicWidgets(fse); - data.put(SciProject.PROJECT_DESCRIPTION, project.getDescription()); + data.put(SciProject.PROJECT_DESCRIPTION, + project.getProjectDescription()); } @Override @@ -68,7 +70,8 @@ public class SciProjectPropertyForm if ((project != null) && getSaveCancelSection().getSaveButton(). isSelected(fse.getPageState())) { - project.setDescription((String) data.get(SciProject.PROJECT_DESCRIPTION)); + project.setProjectDescription((String) data.get( + SciProject.PROJECT_DESCRIPTION)); project.save(); diff --git a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciProjectSubProjectsTable.java b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciProjectSubProjectsTable.java index 4f749f73f..53652a6b6 100644 --- a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciProjectSubProjectsTable.java +++ b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciProjectSubProjectsTable.java @@ -269,7 +269,10 @@ public class SciProjectSubProjectsTable int row, int col) { - if (0 == row) { + SciProject project = (SciProject) m_itemModel.getSelectedObject(state); + SciProjectSubProjectsCollection subProjects = project.getSubProjects(); + + if ((subProjects.size() - 1) == row) { Label label = new Label(""); return label; } else {