Fehlerkorrekturen am sci-types-organization Modul.

git-svn-id: https://svn.libreccm.org/ccm/trunk@553 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2010-10-04 12:18:45 +00:00
parent ed228d8917
commit c6ef4bf03e
22 changed files with 110 additions and 77 deletions

View File

@ -115,7 +115,6 @@ public class GenericOrganizationalUnit extends ContentPage {
DataObject link = add(PERSONS, person);
link.set(ROLE, role);
link.set(PERSON_ORDER, BigDecimal.valueOf(getPersons().size()));
}
public void removePerson(GenericPerson person) {

View File

@ -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:

View File

@ -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);

View File

@ -121,9 +121,5 @@ public class GenericOrganizationalUnitPropertyForm
orgaunit.save();
}
if (m_step != null) {
m_step.maybeForwardToNextStep(fse.getPageState());
}
}
}

View File

@ -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;

View File

@ -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;

View File

@ -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) {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 181 KiB

After

Width:  |  Height:  |  Size: 189 KiB

View File

@ -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);

View File

@ -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("");

View File

@ -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);

View File

@ -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;
}

View File

@ -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;
}

View File

@ -14,16 +14,16 @@ 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;
}

View File

@ -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());

View File

@ -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) {

View File

@ -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);
}
}

View File

@ -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 {

View File

@ -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 {

View File

@ -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);
}
}
}

View File

@ -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();

View File

@ -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 {