From 693ac3db8fe04bc8deb15d85911d4a6bb7bf5c84 Mon Sep 17 00:00:00 2001 From: hjkhjk54 Date: Fri, 4 Nov 2011 14:18:26 +0000 Subject: [PATCH] --- .../edit/n3editing/VTwo/EditConfigurationUtils.java | 9 ++++++++- webapp/web/edit/editRequestDispatch.jsp | 8 +++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/VTwo/EditConfigurationUtils.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/VTwo/EditConfigurationUtils.java index abd73ef33..6b2b8bbd6 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/VTwo/EditConfigurationUtils.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/VTwo/EditConfigurationUtils.java @@ -139,7 +139,10 @@ public class EditConfigurationUtils { //is data property or vitro label public static boolean isDataProperty(String predicateUri, VitroRequest vreq) { - + if(predicateUri == null) { + log.debug("Predicate URI is null so not data property"); + return false; + } if(isVitroLabel(predicateUri)) { return true; } @@ -152,6 +155,10 @@ public class EditConfigurationUtils { } //is object property public static boolean isObjectProperty(String predicateUri, VitroRequest vreq) { + if(predicateUri == null) { + log.debug("Predicate URI is null so not object property"); + return false; + } WebappDaoFactory wdf = vreq.getWebappDaoFactory(); ObjectProperty op = wdf.getObjectPropertyDao().getObjectPropertyByURI(predicateUri); DataProperty dp = wdf.getDataPropertyDao().getDataPropertyByURI(predicateUri); diff --git a/webapp/web/edit/editRequestDispatch.jsp b/webapp/web/edit/editRequestDispatch.jsp index 5f09e7f1b..c56594ea4 100644 --- a/webapp/web/edit/editRequestDispatch.jsp +++ b/webapp/web/edit/editRequestDispatch.jsp @@ -30,9 +30,15 @@ public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp. //forward to Edit Request Dispatch Controller String queryString = request.getQueryString(); //Instead of edit request which is what we'll do later, here we'll forward to Menu Management Controller - //response.sendRedirect("editRequestDispatch?" + queryString); response.sendRedirect(request.getContextPath() + "/editDisplayModel?" + queryString); } + + //This is our way fo being able to test the new edit configuration + //TODO: Remove this when testing done + if(request.getParameter("testEdit") != null) { + String queryString = request.getQueryString(); + response.sendRedirect(request.getContextPath() + "/editRequestDispatch?" + queryString); + } /* Decide which form to forward to, set subjectUri, subjectUriJson, predicateUri, and predicateUriJson in request. Also get the Individual for the subjectUri and put it in the request scope.