- String path = state.substring(1);
- String workspace;
- if (path.equals("")) {
- workspace = null;
- path = "/";
- } else {
- int index = path.indexOf('/');
- if (index == 0) {
- log.error("Cannot interpret " + state);
-// cmsView.navigateTo("~");
- return null;
- } else if (index > 0) {
- workspace = path.substring(0, index);
- path = path.substring(index);
- } else {// index<0, assuming root node
- workspace = path;
- path = "/";
- }
- }
- Session session = suiteUi.getSession(workspace);
- if (session == null)
- return null;
- Node node = Jcr.getNode(session, path);
- return node;
+ String path = state;
+// String path = state.substring(1);
+// String workspace;
+// if (path.equals("")) {
+// workspace = null;
+// path = "/";
+// } else {
+// int index = path.indexOf('/');
+// if (index == 0) {
+// log.error("Cannot interpret " + state);
+//// cmsView.navigateTo("~");
+// return null;
+// } else if (index > 0) {
+// workspace = path.substring(0, index);
+// path = path.substring(index);
+// } else {// index<0, assuming root node
+// workspace = path;
+// path = "/";
+// }
+// }
+
+ ProvidedSession contentSession = (ProvidedSession) CmsUxUtils.getContentSession(contentRepository,
+ suiteUi.getCmsView());
+ return contentSession.get(path);
+// Session session = jcrContentProvider.getJcrSession(contentSession, workspace);
+//// Session session = suiteUi.getSession(workspace);
+// if (session == null)
+// return null;
+// Node node = Jcr.getNode(session, path);
+// return node;