NIHVIVO - 1866 code change to display individual not found message when an attempt is made to access non existing individual.

This commit is contained in:
ass92 2011-02-14 22:12:13 +00:00
parent fc64de26b7
commit fe2373d853

View file

@ -72,7 +72,18 @@ public class EntityEditController extends BaseEditController {
Individual ent = vreq.getAssertionsWebappDaoFactory().getIndividualDao().getIndividualByURI(entURI);
if (ent == null) {
ent = new IndividualImpl(entURI);
try {
RequestDispatcher rd = request.getRequestDispatcher(Controllers.BASIC_JSP);
request.setAttribute("bodyJsp","/jenaIngest/notfound.jsp");
request.setAttribute("portalBean",portal);
request.setAttribute("title","Individual Not Found");
request.setAttribute("css", "<link rel=\"stylesheet\" type=\"text/css\" href=\""+portal.getThemeDir()+"css/edit.css\"/>");
rd.forward(request, response);
} catch (Exception e) {
log.error("EntityEditController could not forward to view.");
log.error(e.getMessage());
log.error(e.getStackTrace());
}
}
Individual inferredEnt = vreq.getFullWebappDaoFactory().getIndividualDao().getIndividualByURI(entURI);