private String publishMetaData(Node node) throws RepositoryException {
// Title
String title;
- if (node!=null && node.isNodeType(NodeType.MIX_TITLE) && node.hasProperty(Property.JCR_TITLE))
+ if (node != null && node.isNodeType(NodeType.MIX_TITLE) && node.hasProperty(Property.JCR_TITLE))
title = node.getProperty(Property.JCR_TITLE).getString() + " - " + getBaseTitle();
else
title = getBaseTitle();
return null;
StringBuilder js = new StringBuilder();
+ if (title == null)
+ title = "";
title = title.replace("'", "\\'");// sanitize
js.append("document.title = '" + title + "';");
jsExecutor.execute(js.toString());
// + " Make sure bundleContext property is set and init() method has been called.");
// }
- Composite comp = new Composite(parent, SWT.BOTTOM);
+ Composite comp = new Composite(parent, SWT.NONE);
comp.setLayout(CmsUtils.noSpaceGridLayout());
Label link = new Label(comp, SWT.NONE);
import org.argeo.cms.ui.LifeCycleUiProvider;
import org.argeo.jcr.JcrUtils;
import org.argeo.node.NodeConstants;
+import org.argeo.node.NodeUtils;
import org.eclipse.rap.rwt.RWT;
import org.eclipse.rap.rwt.application.Application;
import org.eclipse.rap.rwt.application.Application.OperationMode;
log.debug("Theme " + themeId);
for (String css : cssLst) {
application.addStyleSheet(themeId, css, styleSheetRL);
- if (log.isTraceEnabled())
- log.trace(" CSS " + css);
+ if (log.isDebugEnabled())
+ log.debug(" CSS " + css);
}
}
public void init() throws RepositoryException {
Session session = null;
try {
- session = JcrUtils.loginOrCreateWorkspace(repository, workspace);
+ session = NodeUtils.openDataAdminSession(repository, workspace);
+ // session = JcrUtils.loginOrCreateWorkspace(repository, workspace);
VersionManager vm = session.getWorkspace().getVersionManager();
JcrUtils.mkdirs(session, jcrBasePath);
session.save();