class hierarchy was throwing a null pointer exception when the all classes option was selected

This commit is contained in:
Tim Worrall 2015-03-20 15:33:22 -04:00
parent ed0b7f0f0d
commit 8f7a9beea5

View file

@ -46,17 +46,21 @@ public class ListVClassWebappsController extends FreemarkerHttpServlet {
body.put("displayOption", "all");
body.put("pageTitle", "All Classes");
body.put("propertyURI", vreq.getParameter("propertyURI"));
if ( vreq.getParameter("propertyType").equals("object") ) {
body.put("editController", "propertyEdit?uri=");
if ( vreq.getParameter("propertyURI") != null ) {
body.put("propertyURI", vreq.getParameter("propertyURI"));
}
else {
body.put("editController", "datapropEdit?uri=");
}
List<VClass> classes = null;
if (vreq.getParameter("showPropertyRestrictions") != null) {
if ( vreq.getParameter("propertyType").equals("object") ) {
body.put("editController", "propertyEdit?uri=");
}
else {
body.put("editController", "datapropEdit?uri=");
}
body.put("propertyName", vreq.getParameter("propertyName"));
PropertyDao pdao = vreq.getLanguageNeutralWebappDaoFactory().getObjectPropertyDao();
classes = pdao.getClassesWithRestrictionOnProperty(vreq.getParameter("propertyURI"));