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:
parent
fc64de26b7
commit
fe2373d853
1 changed files with 12 additions and 1 deletions
|
@ -72,7 +72,18 @@ public class EntityEditController extends BaseEditController {
|
||||||
|
|
||||||
Individual ent = vreq.getAssertionsWebappDaoFactory().getIndividualDao().getIndividualByURI(entURI);
|
Individual ent = vreq.getAssertionsWebappDaoFactory().getIndividualDao().getIndividualByURI(entURI);
|
||||||
if (ent == null) {
|
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);
|
Individual inferredEnt = vreq.getFullWebappDaoFactory().getIndividualDao().getIndividualByURI(entURI);
|
||||||
|
|
Loading…
Add table
Reference in a new issue