- Neue mögliche Navigationspunkte für PublicPersonalProfile wurde erst nach einem Neustart angezeigt

- Verschiedene kleinere Korrekturen


git-svn-id: https://svn.libreccm.org/ccm/trunk@1095 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2011-09-05 09:27:26 +00:00
parent c1d6e547db
commit e417f60c2a
4 changed files with 50 additions and 23 deletions

View File

@ -1053,7 +1053,7 @@ public class DaBInImporter extends Program {
System.out.println("FAILED");
ex.printStackTrace(System.err);
}
www
System.out.println("Monographies...");
try {
Statement stmt = connection.createStatement(

View File

@ -659,10 +659,6 @@ public class PersonImporter extends Program {
}
tctx.commitTxn();
} catch (UnsupportedEncodingException ex) {
System.err.println("Error: ");
ex.printStackTrace(System.err);
return;
} finally {
if (tctx.inTxn()) {
tctx.abortTxn();

View File

@ -8,6 +8,8 @@ import com.arsdigita.bebop.PageState;
import com.arsdigita.bebop.event.FormInitListener;
import com.arsdigita.bebop.event.FormProcessListener;
import com.arsdigita.bebop.event.FormSectionEvent;
import com.arsdigita.bebop.event.PrintEvent;
import com.arsdigita.bebop.event.PrintListener;
import com.arsdigita.bebop.form.Option;
import com.arsdigita.bebop.form.SingleSelect;
import com.arsdigita.bebop.parameters.NotEmptyValidationListener;
@ -28,6 +30,8 @@ import com.arsdigita.cms.ui.authoring.SimpleEditStep;
import com.arsdigita.dispatcher.DispatcherHelper;
import com.arsdigita.globalization.GlobalizedMessage;
import com.arsdigita.mimetypes.MimeType;
import com.arsdigita.util.UncheckedWrapperException;
import java.util.TooManyListenersException;
import org.apache.log4j.Logger;
/**
@ -76,8 +80,38 @@ public class PublicPersonalProfileNavigationAddForm
SingleSelect navItemSelect = new SingleSelect(navItemModel);
navItemSelect.addValidationListener(new NotNullValidationListener());
navItemSelect.addValidationListener(new NotEmptyValidationListener());
try {
navItemSelect.addPrintListener(new PrintListener() {
navItemSelect.addOption(new Option("", ""));
public void prepare(final PrintEvent event) {
SingleSelect select = (SingleSelect) event.getTarget();
select.addOption(new Option("", ""));
PublicPersonalProfileNavItemCollection navItems =
new PublicPersonalProfileNavItemCollection();
navItems.addLanguageFilter(DispatcherHelper.
getNegotiatedLocale().
getLanguage());
if (showGenerated()) {
navItems.addFilter("generatorClass is not null");
} else {
navItems.addFilter("generatorClass is null");
}
PublicPersonalProfileNavItem navItem;
while (navItems.next()) {
navItem = navItems.getNavItem();
select.addOption(new Option(navItem.getKey(),
navItem.getLabel()));
}
}
});
} catch (TooManyListenersException ex) {
throw new UncheckedWrapperException(ex);
}
/*navItemSelect.addOption(new Option("", ""));
PublicPersonalProfileNavItemCollection navItems =
new PublicPersonalProfileNavItemCollection();
@ -95,7 +129,7 @@ public class PublicPersonalProfileNavigationAddForm
navItemSelect.addOption(new Option(navItem.getKey(),
navItem.getLabel()));
}
}*/
add(navItemSelect);
if (!showGenerated()) {

View File

@ -24,7 +24,6 @@ import com.arsdigita.cms.contenttypes.PublicPersonalProfileNavItemCollection;
import com.arsdigita.cms.publicpersonalprofile.ui.PublicPersonalProfileNavItemsAddForm;
import com.arsdigita.dispatcher.DispatcherHelper;
import com.arsdigita.domain.DomainObjectFactory;
import com.arsdigita.kernel.ui.ACSObjectSelectionModel;
import com.arsdigita.persistence.DataCollection;
import com.arsdigita.persistence.DataObject;
import com.arsdigita.persistence.Session;
@ -71,7 +70,6 @@ public class PublicPersonalProfilesServlet extends BaseApplicationServlet {
final HttpServletResponse response,
final Application app) throws ServletException,
IOException {
PublicPersonalProfileConfig config = PublicPersonalProfiles.getConfig();
String path = "";
logger.debug("PublicPersonalProfileServlet is starting...");
@ -188,6 +186,16 @@ public class PublicPersonalProfilesServlet extends BaseApplicationServlet {
if (navPath == null) {
generateProfileOwnerXml(profileElem, owner, state);
/*DataCollection relatedLinks = RelatedLink.getRelatedLinks(profile, "NONE");
if (relatedLinks.size() > 0) {
}
DataCollection notes = Note.getNotes(profile);
if (notes.size() > 0) {
} */
} else {
final DataCollection links =
RelatedLink.getRelatedLinks(profile,
@ -425,13 +433,6 @@ public class PublicPersonalProfilesServlet extends BaseApplicationServlet {
titlePost.setText(owner.getTitlePost());
}
/*PublicPersonalProfileXmlGenerator personXml =
new PublicPersonalProfileXmlGenerator(
owner);
personXml.generateXML(state,
profileOwnerElem,
"PublicPersonalProfile");*/
if (owner.hasContacts()) {
final GenericPersonContactCollection contacts = owner.getContacts();
//final String contactType = config.getContactType();
@ -444,10 +445,6 @@ public class PublicPersonalProfilesServlet extends BaseApplicationServlet {
generateContactXml(profileOwnerElem,
contacts.getContact(),
state);
/*PublicPersonalProfileXmlGenerator contactXml =
new PublicPersonalProfileXmlGenerator(
contacts.getContact());
contactXml.generateXML(state, profileOwnerElem, "");*/
}
}