projects
/
lgpl
/
argeo-commons.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Better script support in CMS.
[lgpl/argeo-commons.git]
/
org.argeo.cms.ui
/
src
/
org
/
argeo
/
cms
/
ui
/
AbstractCmsEntryPoint.java
diff --git
a/org.argeo.cms.ui/src/org/argeo/cms/ui/AbstractCmsEntryPoint.java
b/org.argeo.cms.ui/src/org/argeo/cms/ui/AbstractCmsEntryPoint.java
index 5c59d601bd4996a00841afe6b4a6b26468448f32..529061e92f0f96229a646cae83a9d7057140adb8 100644
(file)
--- a/
org.argeo.cms.ui/src/org/argeo/cms/ui/AbstractCmsEntryPoint.java
+++ b/
org.argeo.cms.ui/src/org/argeo/cms/ui/AbstractCmsEntryPoint.java
@@
-302,8
+302,10
@@
public abstract class AbstractCmsEntryPoint extends AbstractEntryPoint implement
Node newNode = null;
if (session.nodeExists(newNodePath))
newNode = session.getNode(newNodePath);
Node newNode = null;
if (session.nodeExists(newNodePath))
newNode = session.getNode(newNodePath);
- else
- throw new CmsException("Data " + newNodePath + " does not exist");
+ else {
+// throw new CmsException("Data " + newNodePath + " does not exist");
+ newNode = null;
+ }
setNode(newNode);
}
String title = publishMetaData(getNode());
setNode(newNode);
}
String title = publishMetaData(getNode());
@@
-326,7
+328,7
@@
public abstract class AbstractCmsEntryPoint extends AbstractEntryPoint implement
private String publishMetaData(Node node) throws RepositoryException {
// Title
String title;
private String publishMetaData(Node node) throws RepositoryException {
// Title
String title;
- if (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();
title = node.getProperty(Property.JCR_TITLE).getString() + " - " + getBaseTitle();
else
title = getBaseTitle();