From eaff75777ff6b4c5ba159929f43c6f46539a9b71 Mon Sep 17 00:00:00 2001 From: Jens Pelzetter Date: Mon, 12 Aug 2019 06:23:58 +0200 Subject: [PATCH] Compiles again --- .../ui/SciProjectContactsStep.java | 14 ++--- .../ui/SciProjectContactsTable.java | 59 +++++++++++++++++++ 2 files changed, 66 insertions(+), 7 deletions(-) create mode 100644 sci-types-project/src/main/java/com/arsdigita/cms/contenttypes/ui/SciProjectContactsTable.java diff --git a/sci-types-project/src/main/java/com/arsdigita/cms/contenttypes/ui/SciProjectContactsStep.java b/sci-types-project/src/main/java/com/arsdigita/cms/contenttypes/ui/SciProjectContactsStep.java index 9aeef99..685fd14 100644 --- a/sci-types-project/src/main/java/com/arsdigita/cms/contenttypes/ui/SciProjectContactsStep.java +++ b/sci-types-project/src/main/java/com/arsdigita/cms/contenttypes/ui/SciProjectContactsStep.java @@ -21,7 +21,7 @@ import org.scientificcms.contenttypes.sciproject.SciProjectConstants; * @author Jens Pelzetter */ public class SciProjectContactsStep extends SimpleEditStep { - + private ContactableEntity selectedContact; private String selectedContactType; @@ -44,19 +44,20 @@ public class SciProjectContactsStep extends SimpleEditStep { final BasicItemForm addContactSheet = new SciProjectContactAddForm( itemModel, this, selectedLanguageParam); - + add(SciProjectUiConstants.ADD_CONTACT_SHEET_NAME, new GlobalizedMessage( "cms.contenttypes.ui.genericorgaunit.add_contact", SciProjectConstants.SCI_PROJECT_BUNDLE), new WorkflowLockedComponentAccess(addContactSheet, itemModel), addContactSheet.getSaveCancelSection().getCancelButton()); - - final SciProjectContactsTable contactsTable - = new SciProjectContactsTable(itemModel, this); + + final SciProjectContactsTable contactsTable + = new SciProjectContactsTable( + itemModel, this); setDisplayComponent(contactsTable); } - + public ContactableEntity getSelectedContact() { return selectedContact; } @@ -72,6 +73,5 @@ public class SciProjectContactsStep extends SimpleEditStep { public void setSelectedContactType(final String selectedContactType) { this.selectedContactType = selectedContactType; } -} } diff --git a/sci-types-project/src/main/java/com/arsdigita/cms/contenttypes/ui/SciProjectContactsTable.java b/sci-types-project/src/main/java/com/arsdigita/cms/contenttypes/ui/SciProjectContactsTable.java new file mode 100644 index 0000000..6602163 --- /dev/null +++ b/sci-types-project/src/main/java/com/arsdigita/cms/contenttypes/ui/SciProjectContactsTable.java @@ -0,0 +1,59 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arsdigita.cms.contenttypes.ui; + +import com.arsdigita.bebop.FormProcessException; +import com.arsdigita.bebop.Table; +import com.arsdigita.bebop.event.TableActionEvent; +import com.arsdigita.bebop.event.TableActionListener; +import com.arsdigita.cms.ItemSelectionModel; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Jens Pelzetter + */ +public class SciProjectContactsTable + extends Table + implements TableActionListener { + + private static final Logger LOGGER = LogManager + .getLogger(SciProjectContactsTable.class); + + private final static String TABLE_COL_EDIT = "table_col_edit"; + private final static String TABLE_COL_EDIT_ASSOC = "table_col_edit_assoc"; + private final static String TABLE_COL_DEL = "table_col_del"; + private final static String TABLE_COL_UP = "table_col_up"; + private final static String TABLE_COL_DOWN = "table_col_down"; + + private final ItemSelectionModel itemModel; + private final SciProjectContactsStep editStep; + + public SciProjectContactsTable(final ItemSelectionModel itemModel, + final SciProjectContactsStep editStep) { + + super(); + + this.itemModel = itemModel; + this.editStep = editStep; + + throw new UnsupportedOperationException("ToDo"); + + } + + @Override + public void cellSelected(final TableActionEvent event) throws FormProcessException { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void headSelected(final TableActionEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + +}