RelationAttribute
Habe den Fehler endlich gefunden... Es lassen sich jetzt Contact zu Personen hinzfügen. git-svn-id: https://svn.libreccm.org/ccm/trunk@586 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
c43cdd9616
commit
8680391734
|
|
@ -16,9 +16,6 @@ import org.apache.log4j.Logger;
|
||||||
*/
|
*/
|
||||||
public class RelationAttributeCollection extends DomainCollection {
|
public class RelationAttributeCollection extends DomainCollection {
|
||||||
|
|
||||||
public static final Logger logger =
|
|
||||||
Logger.getLogger(
|
|
||||||
RelationAttributeCollection.class);
|
|
||||||
public static String ATTRIBUTE = RelationAttribute.ATTRIBUTE;
|
public static String ATTRIBUTE = RelationAttribute.ATTRIBUTE;
|
||||||
public static String KEY = RelationAttribute.KEY;
|
public static String KEY = RelationAttribute.KEY;
|
||||||
public static String LANGUAGE = RelationAttribute.LANGUAGE;
|
public static String LANGUAGE = RelationAttribute.LANGUAGE;
|
||||||
|
|
@ -115,9 +112,6 @@ public class RelationAttributeCollection extends DomainCollection {
|
||||||
// Get RelationAttribute in desired language
|
// Get RelationAttribute in desired language
|
||||||
public RelationAttribute getRelationAttribute(String key, String language) {
|
public RelationAttribute getRelationAttribute(String key, String language) {
|
||||||
|
|
||||||
logger.debug(String.format("this.getKey() = %s", this.getKey()));
|
|
||||||
logger.debug(String.format("this.language() = %s", this.getLanguage()));
|
|
||||||
|
|
||||||
// First, test the current element
|
// First, test the current element
|
||||||
if(!this.isBeforeFirst() && key.equals(this.getKey()) && language.equals(this.getLanguage())) {
|
if(!this.isBeforeFirst() && key.equals(this.getKey()) && language.equals(this.getLanguage())) {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,6 @@ public class GenericPersonContactTable extends Table implements TableActionListe
|
||||||
private GenericContact m_contact;
|
private GenericContact m_contact;
|
||||||
private GenericContactTypeCollection contacttypes = new GenericContactTypeCollection();
|
private GenericContactTypeCollection contacttypes = new GenericContactTypeCollection();
|
||||||
|
|
||||||
|
|
||||||
private GenericPersonTableModel(Table t, PageState ps, GenericPerson person) {
|
private GenericPersonTableModel(Table t, PageState ps, GenericPerson person) {
|
||||||
m_table = t;
|
m_table = t;
|
||||||
m_contactCollection = person.getContacts();
|
m_contactCollection = person.getContacts();
|
||||||
|
|
@ -151,7 +150,7 @@ public class GenericPersonContactTable extends Table implements TableActionListe
|
||||||
return m_contactCollection.getContactOrder();
|
return m_contactCollection.getContactOrder();
|
||||||
case 1:
|
case 1:
|
||||||
return contacttypes.getRelationAttribute(m_contactCollection.getContactType(),
|
return contacttypes.getRelationAttribute(m_contactCollection.getContactType(),
|
||||||
DispatcherHelper.getNegotiatedLocale().getLanguage()).getName();
|
DispatcherHelper.getNegotiatedLocale().getLanguage()).getName();
|
||||||
case 2:
|
case 2:
|
||||||
return m_contact.getTitle();
|
return m_contact.getTitle();
|
||||||
case 3:
|
case 3:
|
||||||
|
|
@ -231,7 +230,7 @@ public class GenericPersonContactTable extends Table implements TableActionListe
|
||||||
PageState state = evt.getPageState();
|
PageState state = evt.getPageState();
|
||||||
|
|
||||||
// Get selected GenericContact
|
// Get selected GenericContact
|
||||||
GenericContact contact = new GenericContact(new BigDecimal(evt.getRowKey().toString()));
|
GenericContact contact = new GenericContact(new BigDecimal(evt.getRowKey().toString()));
|
||||||
|
|
||||||
// Get GenericPerson
|
// Get GenericPerson
|
||||||
GenericPerson person = (GenericPerson) m_itemModel.getSelectedObject(state);
|
GenericPerson person = (GenericPerson) m_itemModel.getSelectedObject(state);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue