NIHVIVO-647 Corrections to earlier addition of name attribute: validation code needs to call getName() rather than getId()
This commit is contained in:
parent
368fbff5a0
commit
e5fcb73ad2
1 changed files with 8 additions and 8 deletions
|
@ -246,28 +246,28 @@ public class InputElementFormattingTag extends TagSupport {
|
||||||
Map<String, String> uris = null;
|
Map<String, String> uris = null;
|
||||||
if (editSub != null) { // are reloading a form after a validation error, look in editSub
|
if (editSub != null) { // are reloading a form after a validation error, look in editSub
|
||||||
literals = editSub.getLiteralsFromForm();
|
literals = editSub.getLiteralsFromForm();
|
||||||
if( literals!= null && literals.containsKey(getId())){
|
if( literals!= null && literals.containsKey(getName())){
|
||||||
literal = literals.get(getId());
|
literal = literals.get(getName());
|
||||||
if( literal != null ) {
|
if( literal != null ) {
|
||||||
return literalToString(literal);
|
return literalToString(literal);
|
||||||
}
|
}
|
||||||
} else { //look for a uri
|
} else { //look for a uri
|
||||||
uris = editSub.getUrisFromForm();
|
uris = editSub.getUrisFromForm();
|
||||||
if( uris != null )
|
if( uris != null )
|
||||||
uri = uris.get(getId());
|
uri = uris.get(getName());
|
||||||
if( uri != null ){
|
if( uri != null ){
|
||||||
return uri;
|
return uri;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else { // check in editConfig
|
} else { // check in editConfig
|
||||||
literals = editConfig.getLiteralsInScope();
|
literals = editConfig.getLiteralsInScope();
|
||||||
if( literals != null && literals.containsKey(getId()) ) {
|
if( literals != null && literals.containsKey(getName()) ) {
|
||||||
literal = literals.get(getId());
|
literal = literals.get(getName());
|
||||||
return literalToString(literal);
|
return literalToString(literal);
|
||||||
} else {
|
} else {
|
||||||
uris = editConfig.getUrisInScope();
|
uris = editConfig.getUrisInScope();
|
||||||
if( uris != null && uris.containsKey( getId() ) && uris.get( getId() ) != null ) {
|
if( uris != null && uris.containsKey( getName() ) && uris.get( getName() ) != null ) {
|
||||||
return editConfig.getUrisInScope().get(getId());
|
return editConfig.getUrisInScope().get(getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -356,7 +356,7 @@ public class InputElementFormattingTag extends TagSupport {
|
||||||
if( errors == null || errors.isEmpty())
|
if( errors == null || errors.isEmpty())
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
String val = errors.get(getId());
|
String val = errors.get(getName());
|
||||||
if( val != null){
|
if( val != null){
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue