From 84f3cb93ac1f537cb7e3133af007f88ddedc3e8d Mon Sep 17 00:00:00 2001 From: hjkhjk54 Date: Mon, 28 Nov 2011 18:15:44 +0000 Subject: [PATCH] updates to support including mapping when database isn't new --- webapp/web/edit/editRequestDispatch.jsp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/webapp/web/edit/editRequestDispatch.jsp b/webapp/web/edit/editRequestDispatch.jsp index 534c63939..4281b2c62 100644 --- a/webapp/web/edit/editRequestDispatch.jsp +++ b/webapp/web/edit/editRequestDispatch.jsp @@ -246,11 +246,19 @@ public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp. String oldEdit = request.getParameter("oldEdit"); if( oldEdit == null){ + //First check to see if the form is actually a jsp + //IF so use the custom form mapping + if(form.endsWith(".jsp")) { + //Get the java mapping + if(JspToGeneratorMapping.jspsToGenerators.containsKey(form)) { + form = JspToGeneratorMapping.jspsToGenerators.get(form); + } + } String queryString = request.getQueryString(); response.sendRedirect( request.getContextPath() + "/editRequestDispatch?" + - queryString); + queryString + "&editForm=" + form); return; } else { //For testing the jsp when test parameter has value,