Ergänzen der Lokalisierung.

git-svn-id: https://svn.libreccm.org/ccm/trunk@2225 8810af33-2d31-482b-a856-94f89814c4df
master
pb 2013-06-22 12:17:03 +00:00
parent c58251ff82
commit ede1f2036b
13 changed files with 308 additions and 246 deletions

View File

@ -63,7 +63,8 @@ import com.arsdigita.xml.Element;
* *
* @author Stanislav Freidin * @author Stanislav Freidin
* @author David Lutterkort * @author David Lutterkort
* @version $Id: ControlLink.java 287 2005-02-22 00:29:02Z sskracic $ */ * @version $Id: ControlLink.java 287 2005-02-22 00:29:02Z sskracic $
*/
public class ControlLink extends BaseLink { public class ControlLink extends BaseLink {
/** /**
@ -170,7 +171,6 @@ public class ControlLink extends BaseLink {
try { try {
parent.addAttribute("href", state.stateAsURL()); parent.addAttribute("href", state.stateAsURL());
} catch (IOException e) { } catch (IOException e) {
// e.printStackTrace();
parent.addAttribute("href", ""); parent.addAttribute("href", "");
} }
exportAttributes(parent); exportAttributes(parent);

View File

@ -35,7 +35,6 @@ import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
* @author Shashin Shinde <a href="mailto:sshinde@redhat.com">sshinde@redhat.com</a> * @author Shashin Shinde <a href="mailto:sshinde@redhat.com">sshinde@redhat.com</a>
* *
* @version $Id: ContactAddressProperties.java 287 2005-02-22 00:29:02Z sskracic $ * @version $Id: ContactAddressProperties.java 287 2005-02-22 00:29:02Z sskracic $
*
*/ */
public class ContactAddressProperties extends SimpleEditStep { public class ContactAddressProperties extends SimpleEditStep {

View File

@ -53,6 +53,7 @@ public class ContactCreate extends PageCreate {
m_parent = parent; m_parent = parent;
} }
@Override
protected void addWidgets() { protected void addWidgets() {
/* Add the standard widgets title, name, and optional launchdate */ /* Add the standard widgets title, name, and optional launchdate */

View File

@ -74,9 +74,6 @@ class ContactPhonesTable extends Table implements TableActionListener {
super(); super();
m_selContact = selContact; m_selContact = selContact;
setEmptyView(new Label(ContactGlobalizationUtil.globalize(
"london.contenttypes.ui.contact.phonetable.no_entries_msg")));
TableColumnModel model = getColumnModel(); TableColumnModel model = getColumnModel();
model.add(new TableColumn( model.add(new TableColumn(
COL_INDEX_PHONE_TYPE, COL_INDEX_PHONE_TYPE,
@ -94,6 +91,9 @@ class ContactPhonesTable extends Table implements TableActionListener {
"london.contenttypes.ui.contact.phonetable.header_delete") "london.contenttypes.ui.contact.phonetable.header_delete")
) )); ) ));
setEmptyView(new Label(ContactGlobalizationUtil.globalize(
"london.contenttypes.ui.contact.phonetable.no_entries_msg")));
model.get(2).setCellRenderer(new DeleteCellRenderer()); model.get(2).setCellRenderer(new DeleteCellRenderer());
setModelBuilder(new PhonesTableModelBuilder(selContact)); setModelBuilder(new PhonesTableModelBuilder(selContact));
@ -103,7 +103,7 @@ class ContactPhonesTable extends Table implements TableActionListener {
} }
/** /**
* * Private class Model Builder to build the required data for the table.
*/ */
private class PhonesTableModelBuilder extends LockableImpl private class PhonesTableModelBuilder extends LockableImpl
implements TableModelBuilder { implements TableModelBuilder {
@ -180,12 +180,11 @@ class ContactPhonesTable extends Table implements TableActionListener {
public Object getElementAt(int columnIndex) { public Object getElementAt(int columnIndex) {
switch (columnIndex) { switch (columnIndex) {
case 0: case COL_INDEX_PHONE_TYPE:
return m_phone.getPhoneType(); return m_phone.getPhoneType();
case 1: case COL_INDEX_PHONE_NUM:
return m_phone.getPhoneNumber(); return m_phone.getPhoneNumber();
case 2: case COL_INDEX_DELETE:
// return "Delete";
return new Label( return new Label(
ContactGlobalizationUtil.globalize( ContactGlobalizationUtil.globalize(
"london.contenttypes.ui.contact.phonetable.link_delete") "london.contenttypes.ui.contact.phonetable.link_delete")
@ -207,7 +206,9 @@ class ContactPhonesTable extends Table implements TableActionListener {
} }
/** /**
* Private class to check for the permissions to delete item and put either * Internal private class to handle the click on the delete link in the
* table of available contacts.
* Checks for the permissions to delete item and put either
* a Lable or a ControlLink accordingly. * a Lable or a ControlLink accordingly.
*/ */
private class DeleteCellRenderer extends LockableImpl private class DeleteCellRenderer extends LockableImpl
@ -222,7 +223,8 @@ class ContactPhonesTable extends Table implements TableActionListener {
* @param key * @param key
* @param row * @param row
* @param column * @param column
* @return * @return the link to delete the selected
* entry or just a label without link.
*/ */
public Component getComponent(Table table, PageState state, public Component getComponent(Table table, PageState state,
Object value, boolean isSelected, Object value, boolean isSelected,
@ -240,28 +242,17 @@ class ContactPhonesTable extends Table implements TableActionListener {
if ( value instanceof Label ) { // just the delete Controllink if ( value instanceof Label ) { // just the delete Controllink
if (canDelete) { if (canDelete) {
ret = new ControlLink((Component)value); ControlLink link = new ControlLink( (Component)value );
// ret.setConfirmation(ContactGlobalizationUtil.globalize( link.setConfirmation(ContactGlobalizationUtil.globalize(
// "london.contenttypes.ui.contact.phonetable.confirm_delete")); "london.contenttypes.ui.contact.phonetable.confirm_delete"));
ret = link;
} else { } else {
ret = (Component)value; ret = (Component)value;
} }
} else if ( value instanceof String ) { // phone type and value
// if (canDelete) {
// ret = new ControlLink(value.toString());
// ret = new ControlLink((String)value);
// link.setConfirmation("Delete this Phone ?");
// return link;
// } else {
ret = new Label((String)value);
// }
} else { } else {
// return new Label(value.toString());
/* Just returns the label without underlying link */ /* Just returns the label without underlying link */
ret = new Label(value.toString()); ret = (Component)value;
} }
return ret; return ret;
@ -278,7 +269,6 @@ class ContactPhonesTable extends Table implements TableActionListener {
TableColumn col = getColumnModel().get(evt.getColumn().intValue()); TableColumn col = getColumnModel().get(evt.getColumn().intValue());
int columnIndex = col.getModelIndex(); int columnIndex = col.getModelIndex();
// if (COL_DELETE.equals(colName)) {
if ( columnIndex == COL_INDEX_DELETE ) { if ( columnIndex == COL_INDEX_DELETE ) {
BigDecimal phoneID = new BigDecimal(evt.getRowKey().toString()); BigDecimal phoneID = new BigDecimal(evt.getRowKey().toString());
Contact contact = (Contact) m_selContact.getSelectedObject(state); Contact contact = (Contact) m_selContact.getSelectedObject(state);

View File

@ -37,7 +37,6 @@ import com.arsdigita.bebop.PageState;
* @author Shashin Shinde <a href="mailto:sshinde@redhat.com">sshinde@redhat.com</a> * @author Shashin Shinde <a href="mailto:sshinde@redhat.com">sshinde@redhat.com</a>
* *
* @version $Id: ContactPropertiesStep.java 287 2005-02-22 00:29:02Z sskracic $ * @version $Id: ContactPropertiesStep.java 287 2005-02-22 00:29:02Z sskracic $
*
*/ */
public class ContactPropertiesStep extends SimpleEditStep { public class ContactPropertiesStep extends SimpleEditStep {

View File

@ -1 +1,5 @@
com.arsdigita.london.contenttypes.ui.esdservice.servicetimes=Service Times london.contenttypes.ui.esdservice.servicetimes=Service Times
london.contenttypes.ui.esdservice.select_contact=Select Contact
london.contenttypes.ui.esdservice.no_contacts=No contacts assoziated yet.
london.contenttypes.ui.esdservice.select=select
london.contenttypes.ui.esdservice.select_this_contact=Select this Contact?

View File

@ -0,0 +1,7 @@
london.contenttypes.ui.esdservice.servicetimes=\u00d6ffnungszeiten
london.contenttypes.ui.esdservice.select_contact=Kontakt ausw\u00e4hlen
#No contacts assoziated yet.
london.contenttypes.ui.esdservice.no_contacts=Bisher sind keine Kontakte zugeordnet.
london.contenttypes.ui.esdservice.select=ausw\u00e4hlen
london.contenttypes.ui.esdservice.select_this_contact=Diesen Kontakt ausw\u00e4hlen?
iesen Kontakt ausw\u00e4hlen?

View File

@ -0,0 +1,6 @@
london.contenttypes.ui.esdservice.servicetimes=Service Times
london.contenttypes.ui.esdservice.select_contact=Select Contact
#No contacts assoziated yet.
london.contenttypes.ui.esdservice.no_contacts=No contacts assoziated yet.
london.contenttypes.ui.esdservice.select=select
london.contenttypes.ui.esdservice.select_this_contact=Select this Contact?

View File

@ -0,0 +1,6 @@
london.contenttypes.ui.esdservice.servicetimes=Service Times
london.contenttypes.ui.esdservice.select_contact=Select Contact
#No contacts assoziated yet.
london.contenttypes.ui.esdservice.no_contacts=No contacts assoziated yet.
london.contenttypes.ui.esdservice.select=select
london.contenttypes.ui.esdservice.select_this_contact=Select this Contact?

View File

@ -19,10 +19,11 @@ package com.arsdigita.london.contenttypes.ui;
import com.arsdigita.bebop.Component; import com.arsdigita.bebop.Component;
import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.london.contenttypes.util.ContactGlobalizationUtil;
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
import com.arsdigita.cms.ui.authoring.SimpleEditStep; import com.arsdigita.cms.ui.authoring.SimpleEditStep;
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
import com.arsdigita.london.contenttypes.util.ContactGlobalizationUtil;
import com.arsdigita.london.contenttypes.util.ESDServiceGlobalizationUtil;
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet; import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
/** /**
@ -32,7 +33,6 @@ import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
* @author Shashin Shinde <a href="mailto:sshinde@redhat.com">sshinde@redhat.com</a> * @author Shashin Shinde <a href="mailto:sshinde@redhat.com">sshinde@redhat.com</a>
* *
* @version $Id: ESDServiceChooseContactStep.java 287 2005-02-22 00:29:02Z sskracic $ * @version $Id: ESDServiceChooseContactStep.java 287 2005-02-22 00:29:02Z sskracic $
*
*/ */
public class ESDServiceChooseContactStep extends SimpleEditStep { public class ESDServiceChooseContactStep extends SimpleEditStep {
@ -51,7 +51,8 @@ public class ESDServiceChooseContactStep extends SimpleEditStep {
ESDServiceContactsTable table = new ESDServiceContactsTable(itemModel , this); ESDServiceContactsTable table = new ESDServiceContactsTable(itemModel , this);
addComponent(EDIT_SHEET_NAME, addComponent(EDIT_SHEET_NAME,
"Select Contact", ESDServiceGlobalizationUtil.globalize(
"london.contenttypes.ui.esdservice.select_contact"),
new WorkflowLockedComponentAccess(table, itemModel)); new WorkflowLockedComponentAccess(table, itemModel));
setDisplayComponent(getContactPropertiesSheet(itemModel)); setDisplayComponent(getContactPropertiesSheet(itemModel));
@ -65,19 +66,16 @@ public class ESDServiceChooseContactStep extends SimpleEditStep {
private Component getContactPropertiesSheet(ItemSelectionModel itemModel) { private Component getContactPropertiesSheet(ItemSelectionModel itemModel) {
DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(itemModel); DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(itemModel);
sheet.add( sheet.add(ContactGlobalizationUtil.globalize(
ContactGlobalizationUtil "london.contenttypes.ui.contact.givenname"),
.globalize("com.arsdigita.london.contenttypes.ui.contact_givenname"),
"serviceContact.givenName"); "serviceContact.givenName");
sheet.add( sheet.add(ContactGlobalizationUtil.globalize(
ContactGlobalizationUtil "london.contenttypes.ui.contact.familyname"),
.globalize("com.arsdigita.london.contenttypes.ui.contact_familyname"),
"serviceContact.familyName"); "serviceContact.familyName");
sheet.add( sheet.add(ContactGlobalizationUtil.globalize(
ContactGlobalizationUtil "london.contenttypes.ui.contact.type"),
.globalize("com.arsdigita.london.contenttypes.ui.contact_type"),
"serviceContact.contactType.typeName"); "serviceContact.contactType.typeName");
return sheet; return sheet;

View File

@ -17,11 +17,6 @@
*/ */
package com.arsdigita.london.contenttypes.ui; package com.arsdigita.london.contenttypes.ui;
import com.arsdigita.cms.ContentItem;
import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.london.contenttypes.Contact;
import com.arsdigita.london.contenttypes.ESDService;
import com.arsdigita.bebop.Component; import com.arsdigita.bebop.Component;
import com.arsdigita.bebop.ControlLink; import com.arsdigita.bebop.ControlLink;
import com.arsdigita.bebop.Label; import com.arsdigita.bebop.Label;
@ -34,7 +29,13 @@ import com.arsdigita.bebop.table.TableColumn;
import com.arsdigita.bebop.table.TableColumnModel; import com.arsdigita.bebop.table.TableColumnModel;
import com.arsdigita.bebop.table.TableModel; import com.arsdigita.bebop.table.TableModel;
import com.arsdigita.bebop.table.TableModelBuilder; import com.arsdigita.bebop.table.TableModelBuilder;
import com.arsdigita.cms.ContentItem;
import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.domain.DomainObjectFactory; import com.arsdigita.domain.DomainObjectFactory;
import com.arsdigita.london.contenttypes.Contact;
import com.arsdigita.london.contenttypes.ESDService;
import com.arsdigita.london.contenttypes.util.ContactGlobalizationUtil;
import com.arsdigita.london.contenttypes.util.ESDServiceGlobalizationUtil;
import com.arsdigita.persistence.DataCollection; import com.arsdigita.persistence.DataCollection;
import com.arsdigita.persistence.OID; import com.arsdigita.persistence.OID;
import com.arsdigita.persistence.SessionManager; import com.arsdigita.persistence.SessionManager;
@ -43,31 +44,34 @@ import com.arsdigita.util.LockableImpl;
import java.math.BigDecimal; import java.math.BigDecimal;
/** /**
* A table which displays a list of
* <code>Contact</code> objects to choose from for the
* <code>ESDService</code> content type.
* *
* A table which displays a list of <code>Contact</code> objects to choose * @author Shashin Shinde <a
* from for the <code>ESDService</code> content type. * href="mailto:sshinde@redhat.com">sshinde@redhat.com</a>
*
* @author Shashin Shinde <a href="mailto:sshinde@redhat.com">sshinde@redhat.com</a>
* *
* @version $Id: ESDServiceContactsTable.java 451 2005-03-20 23:11:22Z mbooth $ * @version $Id: ESDServiceContactsTable.java 451 2005-03-20 23:11:22Z mbooth $
*
*/ */
public class ESDServiceContactsTable extends Table implements TableActionListener { public class ESDServiceContactsTable extends Table implements TableActionListener {
private static final String COL_CONTACT_GIVENNAME = "Given Name"; // match columns by (symbolic) index, makes for easier reordering
private static final String COL_CONTACT_FAMILYNAME = "Family Name"; private static final int GIVENNAME_COL_IDX = 0;
private static final String COL_CONTACT_TYPE = "Contact Type"; private static final int FAMILYNAME_COL_IDX = 1;
private static final String COL_CHOOSE_CONTACT = "Select"; private static final int TYPE_COL_IDX = 2;
private static final int CHOOSE_COL_IDX = 3;
private static final String COL_CHOOSE_CONTACT = "Select";
private ItemSelectionModel m_selService; private ItemSelectionModel m_selService;
private ESDServiceChooseContactStep m_parent; private ESDServiceChooseContactStep m_parent;
/** /**
* Constructor. * Constructor.
* @param selService, selection model which will give the <code>ESDService</code> *
* object that we are dealing with. * @param selService, selection model which will give
* @param parent, component whose display pane will be shown when the selection * the <code>ESDService</code> object that we are dealing with.
* of desired contact is done. * @param parent, component whose display pane will be shown when the
* selection of desired contact is done.
*/ */
public ESDServiceContactsTable(ItemSelectionModel selService, public ESDServiceContactsTable(ItemSelectionModel selService,
ESDServiceChooseContactStep parent) { ESDServiceChooseContactStep parent) {
@ -77,12 +81,30 @@ public class ESDServiceContactsTable extends Table implements TableActionListene
m_selService = selService; m_selService = selService;
TableColumnModel model = getColumnModel(); TableColumnModel model = getColumnModel();
model.add( new TableColumn( 0, COL_CONTACT_GIVENNAME)); model.add(new TableColumn(
model.add( new TableColumn( 1, COL_CONTACT_FAMILYNAME )); GIVENNAME_COL_IDX,
model.add( new TableColumn( 2, COL_CONTACT_TYPE)); new Label(ContactGlobalizationUtil.globalize(
model.add( new TableColumn( 3, COL_CHOOSE_CONTACT)); "london.contenttypes.ui.contact.givenname")
) ));
model.add(new TableColumn(
FAMILYNAME_COL_IDX,
new Label(ContactGlobalizationUtil.globalize(
"london.contenttypes.ui.contact.familyname")
) ));
model.add(new TableColumn(
TYPE_COL_IDX,
new Label(ContactGlobalizationUtil.globalize(
"london.contenttypes.ui.contact.type")
) ));
model.add(new TableColumn(
CHOOSE_COL_IDX,
new Label(ESDServiceGlobalizationUtil.globalize(
"london.contenttypes.ui.esdservice.select_contact")
) ));
setEmptyView(new Label("No Contacts available.")); setEmptyView(new Label(ESDServiceGlobalizationUtil.globalize(
"london.contenttypes.ui.esdservice.no_contacts")
));
setModelBuilder(new ContactsTableModelBuilder()); setModelBuilder(new ContactsTableModelBuilder());
model.get(3).setCellRenderer(new SelectCellRenderer()); model.get(3).setCellRenderer(new SelectCellRenderer());
@ -92,18 +114,23 @@ public class ESDServiceContactsTable extends Table implements TableActionListene
} }
/** /**
* Model Builder to build the required data for the table. * Private class Model Builder to build the required data for the table.
*/ */
private class ContactsTableModelBuilder extends LockableImpl implements TableModelBuilder { private class ContactsTableModelBuilder extends LockableImpl
implements TableModelBuilder {
public TableModel makeModel(Table table, PageState state) { public TableModel makeModel(Table table, PageState state) {
table.getRowSelectionModel().clearSelection(state); table.getRowSelectionModel().clearSelection(state);
DataCollection m_contacts = SessionManager.getSession().retrieve(Contact.BASE_DATA_OBJECT_TYPE); DataCollection m_contacts = SessionManager.getSession()
.retrieve(Contact.BASE_DATA_OBJECT_TYPE);
m_contacts.addEqualsFilter(ContentItem.VERSION, ContentItem.DRAFT); m_contacts.addEqualsFilter(ContentItem.VERSION, ContentItem.DRAFT);
return new ContactsTableModel(table, m_contacts); return new ContactsTableModel(table, m_contacts);
} }
} }
/**
* Internal private class
*/
private class ContactsTableModel implements TableModel { private class ContactsTableModel implements TableModel {
private Table m_table; private Table m_table;
@ -115,7 +142,9 @@ public class ESDServiceContactsTable extends Table implements TableActionListene
m_contacts = cts; m_contacts = cts;
} }
/** Return the no. of columns in column model we have constructed. */ /**
* Return the no. of columns in column model we have constructed.
*/
public int getColumnCount() { public int getColumnCount() {
return m_table.getColumnModel().size(); return m_table.getColumnModel().size();
} }
@ -126,7 +155,8 @@ public class ESDServiceContactsTable extends Table implements TableActionListene
*/ */
public boolean nextRow() { public boolean nextRow() {
if (m_contacts.next()) { if (m_contacts.next()) {
m_contact = (Contact) DomainObjectFactory.newInstance(m_contacts.getDataObject()); m_contact = (Contact) DomainObjectFactory
.newInstance(m_contacts.getDataObject());
return true; return true;
} else { } else {
return false; return false;
@ -135,26 +165,31 @@ public class ESDServiceContactsTable extends Table implements TableActionListene
/** /**
* Return the attributes of Contact object in the current row. * Return the attributes of Contact object in the current row.
*
* @see com.arsdigita.bebop.table.TableModel#getElementAt(int) * @see com.arsdigita.bebop.table.TableModel#getElementAt(int)
*/ */
public Object getElementAt(int columnIndex) { public Object getElementAt(int columnIndex) {
switch (columnIndex) { switch (columnIndex) {
case 0: case GIVENNAME_COL_IDX:
return m_contact.getGivenName(); return m_contact.getGivenName();
case 1: case FAMILYNAME_COL_IDX:
return m_contact.getFamilyName(); return m_contact.getFamilyName();
case 2: case TYPE_COL_IDX:
return m_contact.getContactTypeName(); return m_contact.getContactTypeName();
case 3: case CHOOSE_COL_IDX:
return COL_CHOOSE_CONTACT; return new Label(ESDServiceGlobalizationUtil.globalize(
"london.contenttypes.ui.esdservice.select")
);
default: default:
return null; return null;
} }
} }
/** /**
* Always return the ID of <code>Contact</code> represented by current row. * Always return the ID of
* <code>Contact</code> represented by current row.
*
* @see com.arsdigita.bebop.table.TableModel#getKeyAt(int) * @see com.arsdigita.bebop.table.TableModel#getKeyAt(int)
*/ */
public Object getKeyAt(int columnIndex) { public Object getKeyAt(int columnIndex) {
@ -163,33 +198,46 @@ public class ESDServiceContactsTable extends Table implements TableActionListene
} }
/** /**
* TODO:Check for the permissions to EDIT item and put either a Lable or * Internal private class to handle the click on the select link in the
* a ControlLink accordingly. * table of available contacts.
*/ */
private class SelectCellRenderer extends LockableImpl implements TableCellRenderer{ private class SelectCellRenderer extends LockableImpl
implements TableCellRenderer {
/**
*
* @param table
* @param state
* @param value
* @param isSelected
* @param key
* @param row
* @param column
* @return the link to assoziate the selected
* contact entry with the service editet.
*/
public Component getComponent(Table table, PageState state, Object value, public Component getComponent(Table table, PageState state, Object value,
boolean isSelected, Object key, boolean isSelected, Object key,
int row, int column) { int row, int column) {
ControlLink link = new ControlLink( (Component)value );
ControlLink link = new ControlLink(value.toString()); link.setConfirmation(ESDServiceGlobalizationUtil.globalize(
link.setConfirmation("Select this Contact ?"); "london.contenttypes.ui.esdservice.select_this_contact"));
return link; return link;
} }
} }
/** /**
* Provide implementation to TableActionListener method. * Provide implementation to TableActionListener method. Code that comes
* Code that comes into picture when select link in the table is clicked. * into picture when select link in the table is clicked. Handles selection
* Handles selection event. * event.
*/ */
public void cellSelected(TableActionEvent evt) { public void cellSelected(TableActionEvent evt) {
PageState state = evt.getPageState(); PageState state = evt.getPageState();
TableColumn col = getColumnModel().get(evt.getColumn().intValue()); TableColumn col = getColumnModel().get(evt.getColumn().intValue());
String colName = (String) col.getHeaderValue();
if ( COL_CHOOSE_CONTACT.equals(colName) ) { if ( CHOOSE_COL_IDX == evt.getColumn() ) {
m_parent.showDisplayPane(state); m_parent.showDisplayPane(state);
BigDecimal contactID = new BigDecimal(evt.getRowKey().toString()); BigDecimal contactID = new BigDecimal(evt.getRowKey().toString());
ESDService service = (ESDService) m_selService.getSelectedObject(state); ESDService service = (ESDService) m_selService.getSelectedObject(state);
@ -199,11 +247,10 @@ public class ESDServiceContactsTable extends Table implements TableActionListene
} }
/** /**
* provide Implementation to TableActionListener method. * provide Implementation to TableActionListener method. Does nothing in our
* Does nothing in our case. * case.
*/ */
public void headSelected(TableActionEvent e) { public void headSelected(TableActionEvent e) {
throw new UnsupportedOperationException("Not Implemented"); throw new UnsupportedOperationException("Not Implemented");
} }
} }

View File

@ -53,10 +53,12 @@ public class ESDServicePropertiesForm extends BasicPageForm {
* Adds widgets to the form. * Adds widgets to the form.
**/ **/
protected void addWidgets() { protected void addWidgets() {
/* Add standard widgets Title & name/url */
super.addWidgets(); super.addWidgets();
add(new Label(ESDServiceGlobalizationUtil add(new Label(ESDServiceGlobalizationUtil.globalize(
.globalize("com.arsdigita.london.contenttypes.ui.esdservice.servicetimes"))); "london.contenttypes.ui.esdservice.servicetimes")));
ParameterModel serviceTimesParam = new StringParameter(ESDService.SERVICE_TIMES); ParameterModel serviceTimesParam = new StringParameter(ESDService.SERVICE_TIMES);
TextField serviceTimes = new TextField(serviceTimesParam); TextField serviceTimes = new TextField(serviceTimesParam);
add(serviceTimes); add(serviceTimes);

View File

@ -28,17 +28,21 @@ import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
import com.arsdigita.cms.util.GlobalizationUtil; import com.arsdigita.cms.util.GlobalizationUtil;
/** /**
* Authoring kit step to edit the basic properties of <code>ESDService</code> * Authoring kit step to edit the basic properties of
* content type object. * <code>ESDService</code> content type object.
* *
* @author Shashin Shinde <a href="mailto:sshinde@redhat.com">sshinde@redhat.com</a> * @author Shashin Shinde <a
* href="mailto:sshinde@redhat.com">sshinde@redhat.com</a>
* *
* @version $Id: ESDServicePropertiesStep.java 287 2005-02-22 00:29:02Z sskracic $ * @version $Id: ESDServicePropertiesStep.java 287 2005-02-22 00:29:02Z sskracic
* $
* *
*/ */
public class ESDServicePropertiesStep extends SimpleEditStep { public class ESDServicePropertiesStep extends SimpleEditStep {
/** The name of the editing sheet added to this step */ /**
* The name of the editing sheet added to this step
*/
private static String EDIT_SHEET_NAME = "edit"; private static String EDIT_SHEET_NAME = "edit";
/** /**
@ -53,7 +57,7 @@ public class ESDServicePropertiesStep extends SimpleEditStep {
editSheet = new ESDServicePropertiesForm(itemModel); editSheet = new ESDServicePropertiesForm(itemModel);
add(EDIT_SHEET_NAME, add(EDIT_SHEET_NAME,
"Edit", GlobalizationUtil.globalize("cms.ui.edit"),
new WorkflowLockedComponentAccess(editSheet, itemModel), new WorkflowLockedComponentAccess(editSheet, itemModel),
editSheet.getSaveCancelSection().getCancelButton()); editSheet.getSaveCancelSection().getCancelButton());
@ -66,23 +70,22 @@ public class ESDServicePropertiesStep extends SimpleEditStep {
* *
* @param itemModel The ItemSelectionModel to use * @param itemModel The ItemSelectionModel to use
* @pre itemModel != null * @pre itemModel != null
* @return A component to display the state of the basic properties * @return A component to display the state of the basic properties of the
* of the *
**/ */
public static Component getESDServicePropertySheet(ItemSelectionModel itemModel) { public static Component getESDServicePropertySheet(ItemSelectionModel itemModel) {
DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(itemModel); DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(itemModel);
sheet.add( sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.title"),
GlobalizationUtil.globalize("com.arsdigita.london.contenttypes.ui.name"), ESDService.TITLE);
sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.name"),
ESDService.NAME); ESDService.NAME);
sheet.add( sheet.add(ESDServiceGlobalizationUtil.globalize(
ESDServiceGlobalizationUtil "london.contenttypes.ui.esdservice.servicetimes"),
.globalize("com.arsdigita.london.contenttypes.ui.esdservice.servicetimes"),
ESDService.SERVICE_TIMES); ESDService.SERVICE_TIMES);
return sheet; return sheet;
} }
} }