Seiteneffekt der Änderung für das Anzeigen von Contacts in OrganizationPanel (r935/r936) behoben (führte zu fehlerhafter Ansicht der Mitgliederliste)
git-svn-id: https://svn.libreccm.org/ccm/trunk@940 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
71fc621f8d
commit
58001e174b
|
|
@ -92,7 +92,7 @@ public class GenericOrganizationalUnitPanel extends CompoundContentItemPanel {
|
|||
GenericContact contact;
|
||||
contact = contacts.getContact();
|
||||
|
||||
generateContactXML(contact,
|
||||
generateGenericContactXML(contact,
|
||||
contactsElem,
|
||||
state,
|
||||
Integer.toString(contacts.getContactOrder()),
|
||||
|
|
@ -163,11 +163,7 @@ public class GenericOrganizationalUnitPanel extends CompoundContentItemPanel {
|
|||
final PageState state,
|
||||
final String order,
|
||||
final boolean withPerson) {
|
||||
ContactXmlLGenerator generator = new ContactXmlLGenerator(contact);
|
||||
|
||||
generator.generateXML(state, parent, order);
|
||||
|
||||
/*Element contactElem = parent.newChildElement("contact");
|
||||
Element contactElem = parent.newChildElement("contact");
|
||||
contactElem.addAttribute("order", order);
|
||||
|
||||
Element title = contactElem.newChildElement("title");
|
||||
|
|
@ -244,7 +240,17 @@ public class GenericOrganizationalUnitPanel extends CompoundContentItemPanel {
|
|||
country.setText(address.getIsoCountryCode());
|
||||
Element theState = addressElem.newChildElement("state");
|
||||
theState.setText(address.getState());
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
protected void generateGenericContactXML(final GenericContact contact,
|
||||
final Element parent,
|
||||
final PageState state,
|
||||
final String order,
|
||||
final boolean withPerson) {
|
||||
ContactXmlLGenerator generator = new ContactXmlLGenerator(contact);
|
||||
|
||||
generator.generateXML(state, parent, order);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -34,17 +34,23 @@ import com.arsdigita.persistence.SessionManager;
|
|||
*/
|
||||
public class TermCategoryListener implements CategoryListener {
|
||||
|
||||
private static final Logger s_log = Logger.getLogger(TermCategoryListener.class);
|
||||
private static final Logger s_log = Logger.getLogger(
|
||||
TermCategoryListener.class);
|
||||
|
||||
public void onDelete(Category cat) {}
|
||||
public void onDelete(Category cat) {
|
||||
}
|
||||
|
||||
public void onAddChild(Category cat, Category child) {}
|
||||
public void onAddChild(Category cat, Category child) {
|
||||
}
|
||||
|
||||
public void onRemoveChild(Category cat, Category child) {}
|
||||
public void onRemoveChild(Category cat, Category child) {
|
||||
}
|
||||
|
||||
public void onMap(Category cat, ACSObject obj) {}
|
||||
public void onMap(Category cat, ACSObject obj) {
|
||||
}
|
||||
|
||||
public void onUnmap(Category cat, ACSObject obj) {}
|
||||
public void onUnmap(Category cat, ACSObject obj) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create new term by hooking into setDefaultParent() category
|
||||
|
|
@ -57,8 +63,8 @@ public class TermCategoryListener implements CategoryListener {
|
|||
*/
|
||||
public void onSetDefaultParent(Category cat, Category parent) {
|
||||
// Check whether a term already exists for this category.
|
||||
DataCollection allTerms = SessionManager.getSession()
|
||||
.retrieve(Term.BASE_DATA_OBJECT_TYPE);
|
||||
DataCollection allTerms = SessionManager.getSession().retrieve(
|
||||
Term.BASE_DATA_OBJECT_TYPE);
|
||||
allTerms.addEqualsFilter(Term.MODEL, cat.getID());
|
||||
if (allTerms.next()) {
|
||||
s_log.debug("A term already exists for cat: " + cat);
|
||||
|
|
@ -78,8 +84,8 @@ public class TermCategoryListener implements CategoryListener {
|
|||
return;
|
||||
}
|
||||
|
||||
DataCollection domains = SessionManager.getSession()
|
||||
.retrieve(Domain.BASE_DATA_OBJECT_TYPE);
|
||||
DataCollection domains = SessionManager.getSession().retrieve(
|
||||
Domain.BASE_DATA_OBJECT_TYPE);
|
||||
domains.addEqualsFilter(Domain.MODEL, root.getID());
|
||||
Domain termDomain = null;
|
||||
if (domains.next()) {
|
||||
|
|
@ -98,12 +104,9 @@ public class TermCategoryListener implements CategoryListener {
|
|||
}
|
||||
|
||||
Term.create(cat,
|
||||
String.valueOf(maxID.intValue()+1),
|
||||
String.valueOf(maxID.intValue() + 1),
|
||||
false,
|
||||
"",
|
||||
termDomain
|
||||
);
|
||||
termDomain);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue