Merged to trunk. Changed the way a new individual is created on the siteAdmin NIHVIVO-881
This commit is contained in:
parent
4a6aa63393
commit
7911fa6490
4 changed files with 56 additions and 7 deletions
|
@ -66,7 +66,7 @@ public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.
|
|||
String typeOfNew = request.getParameter("typeOfNew");
|
||||
|
||||
//If there is no specified editForm then the subjectURI and the predicate
|
||||
//are needed to determin which form to use for this edit.
|
||||
//are needed to determine which form to use for this edit.
|
||||
if (formParam == null || "".equals(formParam)) {
|
||||
if (subjectUri == null || subjectUri.trim().length() == 0)
|
||||
throw new Error(
|
||||
|
@ -114,9 +114,6 @@ public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp.
|
|||
|
||||
if( subjectUri != null ){
|
||||
Individual subject = wdf.getIndividualDao().getIndividualByURI(subjectUri);
|
||||
//if (subject == null && formParam == null)
|
||||
// throw new Error("In editRequestDispatch.jsp, could not find subject in model: '"
|
||||
// + subjectUri + "'");
|
||||
if( subject != null ){
|
||||
request.setAttribute("subject", subject);
|
||||
}
|
||||
|
|
|
@ -30,8 +30,12 @@
|
|||
if( editConfig != null ){
|
||||
String predicateUri = editConfig.getPredicateUri();
|
||||
if( predicateUri != null ){
|
||||
Property prop = ResourceFactory.createProperty(predicateUri);
|
||||
predicateLocalName = prop.getLocalName();
|
||||
try{
|
||||
Property prop = ResourceFactory.createProperty(predicateUri);
|
||||
predicateLocalName = prop.getLocalName();
|
||||
}catch (com.hp.hpl.jena.shared.InvalidPropertyURIException e){
|
||||
log.debug("could not convert predicateUri into a valid URI",e);
|
||||
}
|
||||
}
|
||||
|
||||
if( editConfig.getEntityToReturnTo() != null && editConfig.getEntityToReturnTo().startsWith("?") ){
|
||||
|
|
|
@ -5,13 +5,22 @@
|
|||
|
||||
<h3>Data Input</h3>
|
||||
|
||||
<form action="editForm" method="get">
|
||||
<%-- <form action="editForm" method="get">
|
||||
<select id="VClassURI" name="VClassURI" class="form-item">
|
||||
<form:option name="VClassId"/>
|
||||
</select>
|
||||
<input type="submit" class="add-action-button" value="Add individual of this class"/>
|
||||
<input type="hidden" name="home" value="<%=portal.getPortalId()%>" />
|
||||
<input type="hidden" name="controller" value="Entity"/>
|
||||
</form> --%>
|
||||
|
||||
<c:url var="editRequestDisUrl" value="/edit/editRequestDispatch.jsp"/>
|
||||
<form action="${editRequestDisUrl}" method="get">
|
||||
<select id="VClassURI" name="typeOfNew" class="form-item">
|
||||
<form:option name="VClassId"/>
|
||||
</select>
|
||||
<input type="hidden" name="editform" value="newIndividualForm.jsp"/>
|
||||
<input type="submit" class="add-action-button" value="Add individual of this class"/>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue