Ergänzen der Lokalisierung.
git-svn-id: https://svn.libreccm.org/ccm/trunk@2225 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
c58251ff82
commit
ede1f2036b
|
|
@ -63,7 +63,8 @@ import com.arsdigita.xml.Element;
|
|||
*
|
||||
* @author Stanislav Freidin
|
||||
* @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 {
|
||||
|
||||
/**
|
||||
|
|
@ -170,7 +171,6 @@ public class ControlLink extends BaseLink {
|
|||
try {
|
||||
parent.addAttribute("href", state.stateAsURL());
|
||||
} catch (IOException e) {
|
||||
// e.printStackTrace();
|
||||
parent.addAttribute("href", "");
|
||||
}
|
||||
exportAttributes(parent);
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@ import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
|
|||
* @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 $
|
||||
*
|
||||
*/
|
||||
public class ContactAddressProperties extends SimpleEditStep {
|
||||
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ public class ContactCreate extends PageCreate {
|
|||
m_parent = parent;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addWidgets() {
|
||||
|
||||
/* Add the standard widgets title, name, and optional launchdate */
|
||||
|
|
|
|||
|
|
@ -74,9 +74,6 @@ class ContactPhonesTable extends Table implements TableActionListener {
|
|||
super();
|
||||
m_selContact = selContact;
|
||||
|
||||
setEmptyView(new Label(ContactGlobalizationUtil.globalize(
|
||||
"london.contenttypes.ui.contact.phonetable.no_entries_msg")));
|
||||
|
||||
TableColumnModel model = getColumnModel();
|
||||
model.add(new TableColumn(
|
||||
COL_INDEX_PHONE_TYPE,
|
||||
|
|
@ -94,6 +91,9 @@ class ContactPhonesTable extends Table implements TableActionListener {
|
|||
"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());
|
||||
|
||||
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
|
||||
implements TableModelBuilder {
|
||||
|
|
@ -180,12 +180,11 @@ class ContactPhonesTable extends Table implements TableActionListener {
|
|||
public Object getElementAt(int columnIndex) {
|
||||
|
||||
switch (columnIndex) {
|
||||
case 0:
|
||||
case COL_INDEX_PHONE_TYPE:
|
||||
return m_phone.getPhoneType();
|
||||
case 1:
|
||||
case COL_INDEX_PHONE_NUM:
|
||||
return m_phone.getPhoneNumber();
|
||||
case 2:
|
||||
// return "Delete";
|
||||
case COL_INDEX_DELETE:
|
||||
return new Label(
|
||||
ContactGlobalizationUtil.globalize(
|
||||
"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.
|
||||
*/
|
||||
private class DeleteCellRenderer extends LockableImpl
|
||||
|
|
@ -222,7 +223,8 @@ class ContactPhonesTable extends Table implements TableActionListener {
|
|||
* @param key
|
||||
* @param row
|
||||
* @param column
|
||||
* @return
|
||||
* @return the link to delete the selected
|
||||
* entry or just a label without link.
|
||||
*/
|
||||
public Component getComponent(Table table, PageState state,
|
||||
Object value, boolean isSelected,
|
||||
|
|
@ -240,28 +242,17 @@ class ContactPhonesTable extends Table implements TableActionListener {
|
|||
if ( value instanceof Label ) { // just the delete Controllink
|
||||
|
||||
if (canDelete) {
|
||||
ret = new ControlLink((Component)value);
|
||||
// ret.setConfirmation(ContactGlobalizationUtil.globalize(
|
||||
// "london.contenttypes.ui.contact.phonetable.confirm_delete"));
|
||||
ControlLink link = new ControlLink( (Component)value );
|
||||
link.setConfirmation(ContactGlobalizationUtil.globalize(
|
||||
"london.contenttypes.ui.contact.phonetable.confirm_delete"));
|
||||
ret = link;
|
||||
} else {
|
||||
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 {
|
||||
// return new Label(value.toString());
|
||||
/* Just returns the label without underlying link */
|
||||
ret = new Label(value.toString());
|
||||
ret = (Component)value;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
@ -278,7 +269,6 @@ class ContactPhonesTable extends Table implements TableActionListener {
|
|||
TableColumn col = getColumnModel().get(evt.getColumn().intValue());
|
||||
int columnIndex = col.getModelIndex();
|
||||
|
||||
// if (COL_DELETE.equals(colName)) {
|
||||
if ( columnIndex == COL_INDEX_DELETE ) {
|
||||
BigDecimal phoneID = new BigDecimal(evt.getRowKey().toString());
|
||||
Contact contact = (Contact) m_selContact.getSelectedObject(state);
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ import com.arsdigita.bebop.PageState;
|
|||
* @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 $
|
||||
*
|
||||
*/
|
||||
public class ContactPropertiesStep extends SimpleEditStep {
|
||||
|
||||
|
|
|
|||
|
|
@ -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?
|
||||
|
|
|
|||
|
|
@ -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?
|
||||
|
|
@ -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?
|
||||
|
|
@ -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?
|
||||
|
|
@ -19,10 +19,11 @@ package com.arsdigita.london.contenttypes.ui;
|
|||
|
||||
import com.arsdigita.bebop.Component;
|
||||
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.SimpleEditStep;
|
||||
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;
|
||||
|
||||
/**
|
||||
|
|
@ -32,7 +33,6 @@ import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
|
|||
* @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 $
|
||||
*
|
||||
*/
|
||||
public class ESDServiceChooseContactStep extends SimpleEditStep {
|
||||
|
||||
|
|
@ -51,7 +51,8 @@ public class ESDServiceChooseContactStep extends SimpleEditStep {
|
|||
ESDServiceContactsTable table = new ESDServiceContactsTable(itemModel , this);
|
||||
|
||||
addComponent(EDIT_SHEET_NAME,
|
||||
"Select Contact",
|
||||
ESDServiceGlobalizationUtil.globalize(
|
||||
"london.contenttypes.ui.esdservice.select_contact"),
|
||||
new WorkflowLockedComponentAccess(table, itemModel));
|
||||
|
||||
setDisplayComponent(getContactPropertiesSheet(itemModel));
|
||||
|
|
@ -65,19 +66,16 @@ public class ESDServiceChooseContactStep extends SimpleEditStep {
|
|||
private Component getContactPropertiesSheet(ItemSelectionModel itemModel) {
|
||||
DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(itemModel);
|
||||
|
||||
sheet.add(
|
||||
ContactGlobalizationUtil
|
||||
.globalize("com.arsdigita.london.contenttypes.ui.contact_givenname"),
|
||||
sheet.add(ContactGlobalizationUtil.globalize(
|
||||
"london.contenttypes.ui.contact.givenname"),
|
||||
"serviceContact.givenName");
|
||||
|
||||
sheet.add(
|
||||
ContactGlobalizationUtil
|
||||
.globalize("com.arsdigita.london.contenttypes.ui.contact_familyname"),
|
||||
sheet.add(ContactGlobalizationUtil.globalize(
|
||||
"london.contenttypes.ui.contact.familyname"),
|
||||
"serviceContact.familyName");
|
||||
|
||||
sheet.add(
|
||||
ContactGlobalizationUtil
|
||||
.globalize("com.arsdigita.london.contenttypes.ui.contact_type"),
|
||||
sheet.add(ContactGlobalizationUtil.globalize(
|
||||
"london.contenttypes.ui.contact.type"),
|
||||
"serviceContact.contactType.typeName");
|
||||
|
||||
return sheet;
|
||||
|
|
|
|||
|
|
@ -17,11 +17,6 @@
|
|||
*/
|
||||
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.ControlLink;
|
||||
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.TableModel;
|
||||
import com.arsdigita.bebop.table.TableModelBuilder;
|
||||
import com.arsdigita.cms.ContentItem;
|
||||
import com.arsdigita.cms.ItemSelectionModel;
|
||||
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.OID;
|
||||
import com.arsdigita.persistence.SessionManager;
|
||||
|
|
@ -43,31 +44,34 @@ import com.arsdigita.util.LockableImpl;
|
|||
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
|
||||
* from for the <code>ESDService</code> content type.
|
||||
*
|
||||
* @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: ESDServiceContactsTable.java 451 2005-03-20 23:11:22Z mbooth $
|
||||
*
|
||||
*/
|
||||
public class ESDServiceContactsTable extends Table implements TableActionListener {
|
||||
|
||||
private static final String COL_CONTACT_GIVENNAME = "Given Name";
|
||||
private static final String COL_CONTACT_FAMILYNAME = "Family Name";
|
||||
private static final String COL_CONTACT_TYPE = "Contact Type";
|
||||
private static final String COL_CHOOSE_CONTACT = "Select";
|
||||
// match columns by (symbolic) index, makes for easier reordering
|
||||
private static final int GIVENNAME_COL_IDX = 0;
|
||||
private static final int FAMILYNAME_COL_IDX = 1;
|
||||
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 ESDServiceChooseContactStep m_parent;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
* @param selService, selection model which will give the <code>ESDService</code>
|
||||
* object that we are dealing with.
|
||||
* @param parent, component whose display pane will be shown when the selection
|
||||
* of desired contact is done.
|
||||
*
|
||||
* @param selService, selection model which will give
|
||||
* the <code>ESDService</code> object that we are dealing with.
|
||||
* @param parent, component whose display pane will be shown when the
|
||||
* selection of desired contact is done.
|
||||
*/
|
||||
public ESDServiceContactsTable(ItemSelectionModel selService,
|
||||
ESDServiceChooseContactStep parent) {
|
||||
|
|
@ -77,12 +81,30 @@ public class ESDServiceContactsTable extends Table implements TableActionListene
|
|||
m_selService = selService;
|
||||
|
||||
TableColumnModel model = getColumnModel();
|
||||
model.add( new TableColumn( 0, COL_CONTACT_GIVENNAME));
|
||||
model.add( new TableColumn( 1, COL_CONTACT_FAMILYNAME ));
|
||||
model.add( new TableColumn( 2, COL_CONTACT_TYPE));
|
||||
model.add( new TableColumn( 3, COL_CHOOSE_CONTACT));
|
||||
model.add(new TableColumn(
|
||||
GIVENNAME_COL_IDX,
|
||||
new Label(ContactGlobalizationUtil.globalize(
|
||||
"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());
|
||||
|
||||
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) {
|
||||
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);
|
||||
return new ContactsTableModel(table, m_contacts);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Internal private class
|
||||
*/
|
||||
private class ContactsTableModel implements TableModel {
|
||||
|
||||
private Table m_table;
|
||||
|
|
@ -115,7 +142,9 @@ public class ESDServiceContactsTable extends Table implements TableActionListene
|
|||
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() {
|
||||
return m_table.getColumnModel().size();
|
||||
}
|
||||
|
|
@ -126,7 +155,8 @@ public class ESDServiceContactsTable extends Table implements TableActionListene
|
|||
*/
|
||||
public boolean nextRow() {
|
||||
if (m_contacts.next()) {
|
||||
m_contact = (Contact) DomainObjectFactory.newInstance(m_contacts.getDataObject());
|
||||
m_contact = (Contact) DomainObjectFactory
|
||||
.newInstance(m_contacts.getDataObject());
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
|
@ -135,26 +165,31 @@ public class ESDServiceContactsTable extends Table implements TableActionListene
|
|||
|
||||
/**
|
||||
* Return the attributes of Contact object in the current row.
|
||||
*
|
||||
* @see com.arsdigita.bebop.table.TableModel#getElementAt(int)
|
||||
*/
|
||||
public Object getElementAt(int columnIndex) {
|
||||
|
||||
switch (columnIndex) {
|
||||
case 0:
|
||||
case GIVENNAME_COL_IDX:
|
||||
return m_contact.getGivenName();
|
||||
case 1:
|
||||
case FAMILYNAME_COL_IDX:
|
||||
return m_contact.getFamilyName();
|
||||
case 2:
|
||||
case TYPE_COL_IDX:
|
||||
return m_contact.getContactTypeName();
|
||||
case 3:
|
||||
return COL_CHOOSE_CONTACT;
|
||||
case CHOOSE_COL_IDX:
|
||||
return new Label(ESDServiceGlobalizationUtil.globalize(
|
||||
"london.contenttypes.ui.esdservice.select")
|
||||
);
|
||||
default:
|
||||
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)
|
||||
*/
|
||||
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
|
||||
* a ControlLink accordingly.
|
||||
* Internal private class to handle the click on the select link in the
|
||||
* 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,
|
||||
boolean isSelected, Object key,
|
||||
int row, int column) {
|
||||
|
||||
|
||||
ControlLink link = new ControlLink(value.toString());
|
||||
link.setConfirmation("Select this Contact ?");
|
||||
ControlLink link = new ControlLink( (Component)value );
|
||||
link.setConfirmation(ESDServiceGlobalizationUtil.globalize(
|
||||
"london.contenttypes.ui.esdservice.select_this_contact"));
|
||||
return link;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide implementation to TableActionListener method.
|
||||
* Code that comes into picture when select link in the table is clicked.
|
||||
* Handles selection event.
|
||||
* Provide implementation to TableActionListener method. Code that comes
|
||||
* into picture when select link in the table is clicked. Handles selection
|
||||
* event.
|
||||
*/
|
||||
public void cellSelected(TableActionEvent evt) {
|
||||
|
||||
PageState state = evt.getPageState();
|
||||
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);
|
||||
BigDecimal contactID = new BigDecimal(evt.getRowKey().toString());
|
||||
ESDService service = (ESDService) m_selService.getSelectedObject(state);
|
||||
|
|
@ -199,11 +247,10 @@ public class ESDServiceContactsTable extends Table implements TableActionListene
|
|||
}
|
||||
|
||||
/**
|
||||
* provide Implementation to TableActionListener method.
|
||||
* Does nothing in our case.
|
||||
* provide Implementation to TableActionListener method. Does nothing in our
|
||||
* case.
|
||||
*/
|
||||
public void headSelected(TableActionEvent e) {
|
||||
throw new UnsupportedOperationException("Not Implemented");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -53,10 +53,12 @@ public class ESDServicePropertiesForm extends BasicPageForm {
|
|||
* Adds widgets to the form.
|
||||
**/
|
||||
protected void addWidgets() {
|
||||
|
||||
/* Add standard widgets Title & name/url */
|
||||
super.addWidgets();
|
||||
|
||||
add(new Label(ESDServiceGlobalizationUtil
|
||||
.globalize("com.arsdigita.london.contenttypes.ui.esdservice.servicetimes")));
|
||||
add(new Label(ESDServiceGlobalizationUtil.globalize(
|
||||
"london.contenttypes.ui.esdservice.servicetimes")));
|
||||
ParameterModel serviceTimesParam = new StringParameter(ESDService.SERVICE_TIMES);
|
||||
TextField serviceTimes = new TextField(serviceTimesParam);
|
||||
add(serviceTimes);
|
||||
|
|
|
|||
|
|
@ -28,17 +28,21 @@ import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
|
|||
import com.arsdigita.cms.util.GlobalizationUtil;
|
||||
|
||||
/**
|
||||
* Authoring kit step to edit the basic properties of <code>ESDService</code>
|
||||
* content type object.
|
||||
* Authoring kit step to edit the basic properties of
|
||||
* <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 {
|
||||
|
||||
/** 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";
|
||||
|
||||
/**
|
||||
|
|
@ -53,7 +57,7 @@ public class ESDServicePropertiesStep extends SimpleEditStep {
|
|||
|
||||
editSheet = new ESDServicePropertiesForm(itemModel);
|
||||
add(EDIT_SHEET_NAME,
|
||||
"Edit",
|
||||
GlobalizationUtil.globalize("cms.ui.edit"),
|
||||
new WorkflowLockedComponentAccess(editSheet, itemModel),
|
||||
editSheet.getSaveCancelSection().getCancelButton());
|
||||
|
||||
|
|
@ -66,23 +70,22 @@ public class ESDServicePropertiesStep extends SimpleEditStep {
|
|||
*
|
||||
* @param itemModel The ItemSelectionModel to use
|
||||
* @pre itemModel != null
|
||||
* @return A component to display the state of the basic properties
|
||||
* of the
|
||||
**/
|
||||
* @return A component to display the state of the basic properties of the
|
||||
*
|
||||
*/
|
||||
public static Component getESDServicePropertySheet(ItemSelectionModel itemModel) {
|
||||
DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(itemModel);
|
||||
|
||||
sheet.add(
|
||||
GlobalizationUtil.globalize("com.arsdigita.london.contenttypes.ui.name"),
|
||||
sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.title"),
|
||||
ESDService.TITLE);
|
||||
sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.name"),
|
||||
ESDService.NAME);
|
||||
|
||||
sheet.add(
|
||||
ESDServiceGlobalizationUtil
|
||||
.globalize("com.arsdigita.london.contenttypes.ui.esdservice.servicetimes"),
|
||||
sheet.add(ESDServiceGlobalizationUtil.globalize(
|
||||
"london.contenttypes.ui.esdservice.servicetimes"),
|
||||
ESDService.SERVICE_TIMES);
|
||||
|
||||
return sheet;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue